title: MIME email, blank message body
body: <p>So I tried searching but couldn't find an answer that I was able to apply to my code.  I have had a developer updating a page for me and these emails come through on my mobile device, but the body is always blank on my computer email, Thunderbird.   The code in question looks like this:</p>
  
  <pre><code>$mailBody = "Dog Registration Form Data" . PHP_EOL . $strDogCName . ";" . $strDogFName . ";" . $strBreed . ";" . $strGender . ";" . $strHt . ";" . $strBdmm . "/" . $strBddd . "/" . $strBdyy . ";" . $strFName . ";" . $strLName . ";" . $strAddr1 . ";" . $strCity . ";" . $strState . ";" . $strZip . ";" . $strCountry . ";" . $strPhone . ";" . $strEMail . ";" . $member_num. ";" . $dog_num;
          // injection test before setting message headers
          $sender_name = $strFName . " " . $strLName;
          $sender_name = injection_test($sender_name);
          $sender_email = injection_test($strEMail);
          // Set headers and send.  This should be moved to a reusable function
          $mime_boundary = md5(time()); 
          $headers = '';
          $msg = '';
          $headers .= 'From: ' . $sender_name . ' &lt;' . $sender_email . '&gt;' . PHP_EOL;
          $headers .= 'Reply-To: ' . $sender_name . ' &lt;' . $sender_email . '&gt;' . PHP_EOL;
          $headers .= 'Return-Path: ' . $sender_name . ' &lt;' . $sender_email . '&gt;' . PHP_EOL;
          $headers .= "Message-ID: &lt;" . time() . "cform@" . $_SERVER['SERVER_NAME'] . "&gt;" . PHP_EOL;
          $headers .= 'X-Sender-IP: ' . $_SERVER["REMOTE_ADDR"] . PHP_EOL;
          $headers .= "X-Mailer: PHP v" . phpversion() . PHP_EOL;
  
          $headers .= 'MIME-Version: 1.0' . PHP_EOL;
          $headers .= 'Content-Type: multipart/related; boundary="' . $mime_boundary . '"';
  
          $msg .= '--' . $mime_boundary . PHP_EOL;
          $msg .= 'Content-Type: text/plain; charset="UTF-8"' . PHP_EOL;
          $msg .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;
  
          $msg .= $mailBody . PHP_EOL . PHP_EOL;
          $msg .= '--' . $mime_boundary . '--' . PHP_EOL . PHP_EOL;
  
          ini_set('sendmail_from', $sender_email);
  
          $msg = "Thank you for registering with NADAC.". PHP_EOL. " Here is the info you provided." . PHP_EOL ."Callname: ". $strDogCName . PHP_EOL. "Registered Name: " . $strDogFName . PHP_EOL . "Breed: " . $strBreed .PHP_EOL . "Gender: " . $strGender .PHP_EOL . "Height: " . $strHt .PHP_EOL . "Birthday: " . $strBdmm . "/" . $strBddd . "/" . $strBdyy .PHP_EOL . "Owner First Name: " . $strFName .PHP_EOL . "Owner Last Name: " . $strLName .PHP_EOL . "Address: " . $strAddr1 .PHP_EOL . "City: " . $strCity .PHP_EOL . "State: " . $strState .PHP_EOL . "Zip Code: " . $strZip .PHP_EOL . "Country: " . $strCountry .PHP_EOL . "Phone: " . $strPhone . PHP_EOL . "Email: " . $strEMail .PHP_EOL . "Associate number: " . $member_num. PHP_EOL . "Dog Number: " . $dog_num;
          $mailSubject = "Thank you for registering.";
  
  
          $send_status = mail($mailTo, $mailSubject, $msg, $headers);
  
          $mailTo = $strEMail;
          mail($mailTo, $mailSubject, $msg, $headers);
  
          ini_restore('sendmail_from');
  
          // should check send_status here and do something - TODO
  
          unset($_POST['submitted']);
          // Done with the mail,  display confirmation
  </code></pre>
  
  <p>I'm sure it's something simple that I'm just missing.  But I can't find it, and the programmer working on it doesn't seem to believe the issue.  I don't believe it's a local issue with my email provider.</p>