Search code examples
phpcronmailing

help with inline images/mail with cron - php?


I've got mailings that need to be sended using cron. When I load the script manualy all works fine. With cron i get broken images.

to change the src of my img i used:

$body    = eregi_replace("managersrc_logo","images/managers/acertainlogo.jpg",$body);

Because i thaught that it is importent to use absolute paths i also tried:

$body    = eregi_replace("managersrc_logo","http://www.site.com/images/managers/acertainlogo.jpg",$body);

In that case i even do not see the images when i run the cronscript manualy. Nor the automated cron will display me the images.

When i check the source of the mail that is received i always see "cid:encryptedstuff" even if i use absolute paths? Why is that? I just want my absolute paths being printed in the src attribute of the img tag. Who changes my absolute path to cid: ? is it php, phpmailer or outlook itself?

Any help someone?


Solution

  • The problem was an older version of phpmailer. I updated to the new version and the images are displayed perfectly now!!