1

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

Code

$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.

Naruto
  • 1,210
  • 3
  • 25
  • 28
Sagar
  • 642
  • 3
  • 14
  • 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 – Sagar Mar 25 '15 at 11:11

2 Answers2

1

Try using Trim function or try str_replace(' ','','the variable that generates the image')

Puya Sarmidani
  • 319
  • 2
  • 7
1

I am finally able to find solution for this. I added encode property like this $mail->encoding = base64. It worked.

Sagar
  • 642
  • 3
  • 14