Gen email question on AOL, HotMail, etc. and HTML mail

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Gen email question on AOL, HotMail, etc. and HTML mail

Post by dstefani »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

I'm using the latest PHP5 version of swift and I have a client who is getting emails bounced back from AOL and Hotmail addresses.

I've set up their mailer for both plain text and HTML email, in theory shouldn't AOL and others just ignore the HTML content and read the plain?

Here is the code:

Code: Select all

...
// subject
$message = new Swift_Message($mail_subject);

// plain text part of email
$message->attach(new Swift_Message_Part($mail_text_body));

// HTML part of email
$message->attach(new Swift_Message_Part($mail_html_body, "text/html"));

// return address for bounced back email addresses
$message->setReturnPath($catch_mail);

// start recipients list
$recipients = new Swift_RecipientList();

...

while($rows = mysql_fetch_assoc($results)) {

    $ml_email = $rows['email'];
    $recipients->addTo($ml_email);
}

...

// creat batch
$batch = new Swift_BatchMailer($swift);

$batch->setSleepTime(10); //Sleep for 10 seconds if an error occurs

// send batch
$num_sent = $batch->send($message, $recipients, $from_email);

...
It's seems to work fine, I just wanted to make sure it wasn't something I've done.
Or might not be doing that would make AOL at least take the plain text.

Thanks,

- Don


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply