Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/313435-php-mail-truncating/
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/313435-php-mail-truncating/#findComment-1588599
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.