Reputation: 647
I see random spaces in the html mail which breaks entire html structure and gives the weird html mail.
I am using SENDY newsletter API to send mail to clients. The html mail is working fine in all other email clients like outlook express and so on.. except 'ZIMBRA' email client where I see random spaces which is leading to weird html mail.
For Ex: If image path is say http://www.example.com/12.jpg and it gives you
http://ww w.example.com/1 2.jpg
$postdata = http_build_query(
array(
'api_key' => 'xxx',
'from_name' => 'xxx',
'from_email' => 'xxx',
'reply_to' => 'xxx',
'subject' => 'Daily',
'html_text' => html_content,
'list_ids' => 'hhjh',
'send_campaign' => 1
)
);
$opts = array('http' => array('method' => 'POST', 'header' => Array('Content: text/html', 'charset=UTF-8'), 'content' => $postdata));
Please help me, Thanks in advance.
Upvotes: 1
Views: 714
Reputation: 647
I am finally able to find solution for this. I added encode property like this $mail->encoding = base64. It worked.
Upvotes: 1
Reputation: 319
Try using Trim function or try str_replace(' ','','the variable that generates the image')
Upvotes: 1