Email content not visible when recieved at yahoo.com
Posted: Wed Nov 29, 2006 9:53 am
Hi all,
I'm sending an email to a mailing list, the email contain html content and it's getting displayed perfectly at gmail, thunderbird and so on.... while at yahoo.com (not including their new beta mail client) and walla.co.il the content of the email is just empty.
I noticed that at yahoo.com & walla.co.il the subject of the email isn't displayed correctly with the hebrew letters, mabye it's a problem cause of the encoding?
I wrote the following code:
Thanks a lot!
Yonatan
I'm sending an email to a mailing list, the email contain html content and it's getting displayed perfectly at gmail, thunderbird and so on.... while at yahoo.com (not including their new beta mail client) and walla.co.il the content of the email is just empty.
I noticed that at yahoo.com & walla.co.il the subject of the email isn't displayed correctly with the hebrew letters, mabye it's a problem cause of the encoding?
I wrote the following code:
Code: Select all
$maillist_recipents = array();
$sender_e_mail = "support@bazz.co.il";
$sender_name = "Bazz.co.il";
$subject = "Bazz.co.il mailing list test";
require("/include/Swift/Swift.php");
require("/include/Swift/Swift/Connection/SMTP.php");
require("/include/Swift/Swift/Plugin/AntiFlood.php");
$connectionObject = new Swift_Connection_SMTP('localhost',25);
$swift = new Swift($connectionObject);
$swift->setCharset('WINDOWS-1255');
if(!$swift->isConnected()) {
return false;
}
//100 mails per batch with a 90 second pause between batches
$swift->loadPlugin(new Swift_Plugin_AntiFlood(100, 90));
// for non html compatible clients
$swift->addPart("blah blah in hebrew");
$body = $this->arrangeMaillistBody ($maillist_mail_id);
$swift->addPart($body, 'text/html');
// just retrieve an array of maillist recipents
$maillist_recipents = $this->retrieveMaillistSubscribers($maillist_mail_id);
//Make the script run until it's finished in the background
set_time_limit(0); ignore_user_abort();
echo "<b>".hebrev("blah blah in hebrew again")."</b><br /><br />";
flush(); ob_flush();
$swift->send($maillist_recipents, $sender_name.' <'.$sender_e_mail.'>', $subject, false, 'text/html', 'WINDOWS-1255');
print ("The emails were sent successfully <br>");
print("<pre>");
print("</pre>");
$swift->close();Yonatan