문제

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?

도움이 되었습니까?

해결책 2

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

다른 팁

can you post a sample html before and after being replaced (but before being sent)? maybe it has additional characters that break the url, ie src="/managersrc_logo". Also, maybe your mailing program has an option to integrate the images inside the message and can't find them?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top