php-general | 2001122
Date: 12/18/01
- Next message: Julio Nobrega Trabalhando: "Re: [PHP] Re: $PHPSESSID on PHP 4.1.0"
- Previous message: Andrey Hristov: "Re: [PHP] Re: $PHPSESSID on PHP 4.1.0"
- Next in thread: Gerard Onorato: "Re: [PHP] HTML Email"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
It looks fine to me. The only difference is that I use
Content-Transfer-Encoding: quoted-printable, which shouldn't make
much of a difference here. A very small misplacement of a newline
character or even a space can cause things not to work correctly.
Your best course of debugging is to send a successful (look for a
"send this page as email" link) HTML email to your outlook account.
Open the message in a new window and inspect the headers carefully.
Then you try to mimic that.
In the end I skip using php's mail() function and use a socket
connection and speak directly with the SMTP host.
It all seems so easy in the beginning, but as soon as you start
testing your html email in different email programs you realize that
they all behave slight differently. The differences between Eudora,
Outlook, Hotmail, AOL, Yahoo, Pine, etc are enough to drive you nuts.
For more info read this: http://www.arsdigita.com/asj/mime/
jim
>Okay I know I must be overlooking somethign super obvious but....
>
>I am trying to send a simple HTML email. It works in Netscape mail,
>Pegasus etc however in Outlook and Outlook express it actually
>places the
>
>Content-Type: text/html;
>charset=iso-8859-1 Content-Transfer-Encoding: 7bit
>
>in the body of the email all displays all the HTML instead of
>showing the email as a web page. I ahev inserted the code below. I
>know it is something stupid,
>so please help.
>
> if ($htmlEmail) {
> $headers =
>"MIME-Version: 1.0\r\n";
> $headers .=
>"Content-Type: text/html; charset=iso-8859-1\r\n";
> $headers .=
>"Content-Transfer-Encoding: 7bit" . "\r\n";
> $body = $html_body;
> }
>
> $headers .= "From: $from\r\n\";
> ($cc != "")?($headers .= "Cc: $cc\r\n"):("");
> ($bcc != "")?($headers .= "Bcc: $bcc\r\n"):("");
>
> mail($email, $subject, $body,
>$headers);
>
>Anyone see what I am doing wrong? Thanks in advance!
>
>Gerard
>
>
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe <email protected>
>For additional commands, e-mail: php-general-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim <email protected>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Julio Nobrega Trabalhando: "Re: [PHP] Re: $PHPSESSID on PHP 4.1.0"
- Previous message: Andrey Hristov: "Re: [PHP] Re: $PHPSESSID on PHP 4.1.0"
- Next in thread: Gerard Onorato: "Re: [PHP] HTML Email"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

