| Image URL broken during mail
|
matthewamzn

msg:4001364 | 12:51 pm on Oct 5, 2009 (gmt 0) | When I send an email newsletter, everything looks good except often one image will be broken. Here's an example: http://www.example.com/files/thumbs/151_32_wYHGFcibTh.JPG turns to this in the email: http://www.example.com/files/thumbs/151_32_wYHGFcibTh.J!%20PG Can I protect it from being altered? What's causing !%20 being added? This is my mail method:
public static function send_html($to, $from, $reply_to, $subject, $message) { $headers = "From: " . $from . "\r\n"; $headers .= "Reply-To: ". $reply_to . "\r\n"; //$headers .= "CC: " . $cc . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($to, $subject, $message, $headers); } [edited by: eelixduppy at 4:01 pm (utc) on Oct. 5, 2009] [edit reason] switched to example.com [/edit]
|
andrewsmd

msg:4001728 | 8:50 pm on Oct 5, 2009 (gmt 0) | Where is your message getting created? Try doing a var_dump on your message at the beginning of the function you posted, and see if it is what it is supposed to be. Then you know it is a problem with the mail function and not your code.
|
TheMadScientist

msg:4002046 | 11:28 am on Oct 6, 2009 (gmt 0) | andrewsmd has a good idea, also here are a couple of questions: Is the img url the only thing on the line in the compilation of the $message (IOW: \nhttp://www.example.com/files/thumbs/151_32_wYHGFcibTh.JPG\n) and are you using wordwrap()? Your mail function looks fine.
|
|
|