php - Email Images Suddenly Stopped Showing -
i have custom php script runs @ 11:30-12:00 every day sends out custom branded newsletter 660 people.
this has been working 3 years , emails html based images loaded in remotely server user can choose in mail client whether or not load them automatically or not etc. main ones being header image , 10 little square png/jpg images represent small banner images.
however within last 3 days emails have been receiving (as tests) have been coming through without images showing , alt tag displayed.
this makes email pretty bad.
i can go website , see article display , in debug file can see application sending off correct html src attributes article webserver , plugin converts emails articles working fine.
i use thunderbird had update , before update set allow remotely loaded images site.
however when open email don't "options" button or line above email says "to protect privacy, thunderbird has blocked remote content in message" stops images appearing in other emails until set allow remote content domain want. cannot see way of changing setting apart line inserted above email.
when view html source can take src attribute each image isn't showing , paste browser , image appear.
also when send test hotmail/outlook account images appear fine.
i suspect either thunderbirds recent update or connection timeout issue script mailserver. though raised 10 30 seconds!
i using phpmailer object send emails out , setting correct headers lists etc. load article in database first , replace ##content## placeholder in "wrapper" email string.
i loop through members , details (name, unsubscribe link, email address etc) , replace other placeholders e.g ##name## , ##unsubscribelink## correct html.
i call send email function uses code (basically)
$mail = new phpmailer; $mail->ismail(); $mail->smtpkeepalive = true; $mail->timeout = 30; // set timeout 30 seconds usual 10 in case slow code holding $to = "myemail@fortesting.co.uk"; $name = "my name"; $from = "admin@mywebsite.com"; $mail->host = 'localhost'; // specify main , backup server $mail->addcustomheader("list-id: daily newsletter"); $mail->addcustomheader("list-unsubscribe", "<$unsubscribelink>"); $mail->addcustomheader("x-listmember: $to"); $mail->addcustomheader("precedence: bulk"); $mail->from = 'freetips@ukhorseracingtipster.com'; $mail->fromname = 'my mailing list name'; $mail->addaddress($to, $name); // add recipient $mail->addreplyto('donotreply@mywebsite.com', 'my name'); $mail->wordwrap = 50; // set word wrap 50 characters $mail->ishtml(true); // set email format html $mail->subject = $subject; $mail->body = $body; // result $r = $mail->send();
i wait sleep command of second give server rest before going next iteration of loop.
when run test script sends single email myself images don't show don't think server load , code hasn't changed when working.
the thing has changed update thunderbird. update firefox has been nightmare.
everytime open ff crashes within 30 seconds , tries send error report.
so wrong mozilla , thunderbird based on moz wondering if there sort of link between two?
ideas -increase connection timeout property 60 seconds? -increase sleep seconds amount between each iteration 3 seconds? -re-install thunderbird (as going ff) -find out how can re-set reload remote image property emails had been set don't option on these emails now.
if has similar issues or ideas how can go debugging or fixing love hear it.
thanks in advance received.
Comments
Post a Comment