Mailer issue with PHP and MySQL
am 18.11.2005 19:32:59 von Chris Payne
------=_NextPart_000_0011_01C5EC44.97E648F0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi Guys,
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.
$MP = "sendmail -t";
$HT = "
";
$HT = "";
$fd = popen($MP,"w");
fputs($fd,"MIME-Version: 1.0\r\n");
fputs($fd,"Content-type: text/html; charset=iso-8859-1\r\n");
fputs($fd, "To: $word\n");
fputs($fd, "From: $email\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP3\n");
fputs($fd, "From: $email\n");
fputs($fd, "Email: $email\n");
fputs($fd, "$messageheader"); // actually this is the message itself
pclose($fd);
Any help would be REALLY appreciated.
Chris
------=_NextPart_000_0011_01C5EC44.97E648F0--
RE: Mailer issue with PHP and MySQL
am 18.11.2005 20:04:58 von Bastien Koert
try phpmailer
Note, check with your host to ensure they have a proper domain to send the
emails from that matches your site...many MTAs now kill mails from localhost
or a host that doens't match the orgiinal domain
bastien
>From: "Chris Payne"
>To:
>Subject: [PHP-DB] Mailer issue with PHP and MySQL
>Date: Fri, 18 Nov 2005 13:32:59 -0500
>
>Hi Guys,
>
>
>
>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.
>
>
>
>$MP = "sendmail -t";
>
>$HT = "";
>
>$HT = "";
>
>
>
>$fd = popen($MP,"w");
>
>fputs($fd,"MIME-Version: 1.0\r\n");
>
>fputs($fd,"Content-type: text/html; charset=iso-8859-1\r\n");
>
>fputs($fd, "To: $word\n");
>
>fputs($fd, "From: $email\n");
>
>fputs($fd, "Subject: $subject\n");
>
>fputs($fd, "X-Mailer: PHP3\n");
>
>fputs($fd, "From: $email\n");
>
>fputs($fd, "Email: $email\n");
>
>fputs($fd, "$messageheader"); // actually this is the message itself
>
>pclose($fd);
>
>
>
>Any help would be REALLY appreciated.
>
>
>
>Chris
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Mailer issue with PHP and MySQL
am 19.11.2005 20:20:35 von Manuel Lemos
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/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php