Re: Mailer issue with PHP and MySQL

From: Date: Sat, 19 Nov 2005 19:20:35 +0000
Subject: Re: Mailer issue with PHP and MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40701@lists.php.net to get a copy of this message
Hello, on 11/18/2005 04:32 PM Chris Payne said the following:
I'm using PHP with MySQL data to send a very important email to clients when they enter the recipients email address into the system. On the whole it works for ME, to either my yahoo email address or any of my own domains email addresses that I have, However, when my WIFE gets it it isn't HTML (Even though mine is) with outlook OR outlook express and my boss doesn't get it at ALL even at his yahoo address, so something is wrong with my script. Can anyone look at it please and let me know if anything is blazingly obvious that I've done wrong? As I said I can receive emails on any account I personally try, but my boss cannot and if it doesn't work for him it's basically not working in his eyes as it could be having the same issue with others.
You should never send HTML only messages. Normal mail clients always send HTML messages with an alternative text part. Spam filters that whatever sends HTML only messages is not a normal mail client, so they rightfully assume that the message is sent by a bulk-mailer and discard it. You need to send a message with multipart/alternative MIME part that encapsulates the text and HTML parts. This is a bit complex. You may want to try this MIME message composing and sending class that can do that for you. Just try the test_simple_html_mail_message.php example script and that is all you need to know. BTW, if you are sending the same message to many recipients at the same time, the class provide a few optimization tricks to speedup your deliveries: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.db (#40701) next »