# PHP geneerate email blank in Yahoo

**URL:** <https://forum.kirupa.com/t/php-geneerate-email-blank-in-yahoo/287756>\
**Category:** programming\
**Created:** [May 5, 2009, 10:25pm UTC](https://forum.kirupa.com/t/php-geneerate-email-blank-in-yahoo/287756 "2009-05-05T22:25:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![3dron](https://avatars.discourse-cdn.com/v4/letter/3/2acd7d/32.png) [@3dron](https://forum.kirupa.com/u/3dron)\
**Post date:** [May 5, 2009, 10:25pm UTC](https://forum.kirupa.com/t/php-geneerate-email-blank-in-yahoo/287756/1 "2009-05-05T22:25:16Z")

</div>

The email appears correctly in Outlook. Here is my code

$headers = "From: [auto-mailer@mydomain.com](mailto:auto-mailer@mydomain.com)  
";  
$headers .= "Reply-To: [auto-mailer@mydomain.com](mailto:auto-mailer@mydomain.com)  
";  
$headers .= "MIME-Version: 1.0  
";

//$headers .= "Content-Type: text/html; charset=ISO-8859-1  
“;  
$headers .= “Content-Type: multipart/related; type=“multipart/alternative”;boundary=”----=MIME\_BOUNDRY\_main\_message”  
";  
$headers .= "X-Sender: [auto-mailer@mydomain.com](mailto:auto-mailer@mydomain.com)  
";  
$headers .= "X-Mailer: PHP4  
"; //mailer  
$headers .= "X-Priority: 3  
"; //1 UrgentMessage, 3 Normal  
$headers .= "Return-Path: [marc@marcszabo.com](mailto:marc@marcszabo.com); [auto-mailer@marcszabo.com](mailto:auto-mailer@marcszabo.com)  
";  
$headers .= "This is a multi-part message in MIME format.  
";  
$headers .= "------=MIME\_BOUNDRY\_main\_message  
“;  
$headers .= “Content-Type: multipart/alternative; boundary=”----=MIME\_BOUNDRY\_message\_parts”  
";

//plaintext section begins  
$message = "------=MIME\_BOUNDRY\_message\_parts  
";  
$message .= "Content-Type: text/plain; charset=“iso-8859-1”  
";  
$message .= "Content-Transfer-Encoding: quoted-printable  
";  
$message .= "  
";  
$message .= stripslashes($title) . "  
";  
$message .= “Please visit [MYDOMAIN.COM](http://MYDOMAIN.COM)”;  
$message .= "  
";  
//html section begins  
$message .= "------=MIME\_BOUNDRY\_message\_parts  
";  
$message .= "Content-Type: text/html;  
charset=“iso-8859-1”  
";  
$message .= "Content-Transfer-Encoding: base64

";  
$message .= chunk\_split(base64\_encode($emailbody));

$message .= "  
";  
$message .= "------=MIME\_BOUNDRY\_message\_parts–  
";  
$message .= "  
";  
$message .= "------=MIME\_BOUNDRY\_main\_message–  
";

My email body is one string html code cut from dreamweaver of everything between

```auto
 and 

```

with all quotations escaped as "

I forget where I actually hacked up this code from, but I had to comment out

//$headers .= "Content-Type: text/html; charset=ISO-8859-1  
";

or the email that comes in is a bunch of gibberish in Yahoo (but not blank), but still comes up properly in Outlook.

Please help.

Ron R.
