nzgrub Posted July 26, 2021 Share Posted July 26, 2021 I have a line in a php email that is ..... $message .= '<table role="presentation" width="640" style="width:640px;" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td align="center" bgcolor="#EEEEEE" background="https://safebuy.nz/images/background.png" valign="top" style="background: url("https://safebuy.nz/images/background.png") center / cover repeat #EEEEEE;">'; But when it arrives in email it reads..... <table role="presentation" width="640" style="width:640px;" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td align="center" bgcolor="#EEEEEE" background="http://safebuy.nz/images/background.png" valign="top" style="background: url(" http:="" safebuy.nz="" images="" background.png?)="" center="" cover="" repeat="" #EEEEEE;?=""> So I get no background in my email. The rest of email sends fine. Where have I gone wrong. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/313435-php-mail-truncating/ Share on other sites More sharing options...
requinix Posted July 26, 2021 Share Posted July 26, 2021 Post code. Quote Link to comment https://forums.phpfreaks.com/topic/313435-php-mail-truncating/#findComment-1588598 Share on other sites More sharing options...
nzgrub Posted July 26, 2021 Author Share Posted July 26, 2021 Not sure how much you need its only that one line giving problems but heres more... $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Create email headers $headers .= 'From: '.$from."\r\n". 'Reply-To: '.$from."\r\n" . 'X-Mailer: PHP/' . phpversion(); // HTML email message $message = '<html><body>'; $message .= '<table role="presentation" width="640" style="width:640px;" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td align="center" bgcolor="#EEEEEE" background="https://safebuy.nz/images/background.png" valign="top" style="background: url("https://safebuy.nz/images/background.png") center / cover repeat #EEEEEE;">'; $message .= '<p>Seller has sent the goods for Safebuy reference sid'.$_POST["sid_trans"].'</p>'; $message .= '<p>Description of goods: '.$idesc.'</p>'; $message .= '<p>'.$track.'</p>'; $message .= '<p>Let us know when goods have arrived at <a href="http://safebuy.nz/posted/buyers-evaluation.php?sid_trans='.$_POST["sid_trans"].'">http://safebuy.nz/posted/buyers-evaluation.php?sid_trans='.$_POST["sid_trans"].'</a> .</p>'; $message .= '</td></tr></table></body></html> Quote Link to comment https://forums.phpfreaks.com/topic/313435-php-mail-truncating/#findComment-1588599 Share on other sites More sharing options...
requinix Posted July 26, 2021 Share Posted July 26, 2021 style="background: url("https://safebuy.nz/images/background.png") center / cover repeat #EEEEEE;" Take a closer look at that. Quote Link to comment https://forums.phpfreaks.com/topic/313435-php-mail-truncating/#findComment-1588601 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.