Reputation: 47
I have set up a cron job on my server and it is running everyday and sending out the mail. However on all the mails images are missing.
when I run the php file directly from website like this www.mysite.com/cronjobs/sendmail.php it runs fine. All mails are sent out too and all images show up.
Are images referenced different when run from a cronjob?
Or could it be they get blocked when run from a cronjob?
Could somebody please explain what could be wrong.
Upvotes: 0
Views: 296
Reputation: 5755
As was stated the problem seems to be in relative paths you use. If you want to keep using them attach all used images as attachments to the mail.
The second option is to use absolute paths. Btw don't forget to give your images folder read permissions.
Upvotes: 1