Help!! MIME error with mail() and attachment
<p>The following script works (almost) just as I want.  This project is so near completion with one small problem.  In the email message I get the following: "If you can see this MIME then your client doesn't accept MIME types!
--jacquie1003"</p>

<p>This is being sent through Novell GroupWise.  I have included the mail script and the resulting email.  The email arrives with the attachment and everything seems good except that error message.  See the message body below.</p>

<p>The users are completing a form with approximately 95 fields.  When they submit a validation is done on mandatory fields.  If everthing is complete the completed form is presented to them in the same window, a file is created, and the email is created and sent (with the created file as an attachment) to one of five preset recipient groups.</p>

<p>What am I doing wrong in my mail script.  Any help would be greatly appreciated.  At this point I am not looking to use PEAR, PHPmailer, Zend, etc... unless I absolutely have to.</p>

<p>I apologize in advance for some of the formatting of my cut-and-paste.  Thank you in advance</p>

<p><strong>beginning of mail script</strong></p>

<pre>$head_division = $_POST['head_division'];
$category = $_POST['category'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];

$FilePath = "c:\\temp\\resumes\\";
$FileName = $officer_pr . "_" . $inc_number . ".html";
$ResumeFile = $FilePath . $FileName; 

$to = $fname . "." . $lname . "@tucsonaz.gov";
$from = $fname . "." . $lname;
$subject = $head_division . " Divsional Resume (Test)";

$bound_text = "jacquie1003"; 
$bound = "--".$bound_text."\r\n"; 
$bound_last = "--".$bound_text."--\r\n"; 

$header ="From: " . $from . "@tucsonaz.gov" . "\r\n";  
$header .="MIME-Version: 1.0\r\n";
$header .="Content-Type: multipart/mixed; boundary=\"$bound_text\"";
$message = "If you can see this MIME then your client doesn't accept MIME types!\r\n"
.nl2br($message)
.$bound;

$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"
."Content-Transfer-Encoding: 7bit\r\n\r\n"
."Please see the attached resume file.<br /><br />"
."<strong>Incident Summary</strong><br />"
."<strong>Case Number:</strong> " . $inc_number . "<br />"
."<strong>Category:</strong> " . $category . "<br />"
."<strong>UCR:</strong> " . $ucr . "<br />"
."<strong>Location:</strong> " . $inc_street . "<br />"
."<strong>Date:</strong> " . $inc_date . "<br />"
."<strong>Time:</strong> " . $inc_time . "<br />"
."<strong>Officer:</strong> " . $officer . "&nbsp/&nbsp" . $officer_pr . "<br />"
.nl2br($message)
.$bound;

$file = file_get_contents($ResumeFile);

$message .= "Content-Type: text/html; name=" . $FileName . "\r\n"
."Content-Transfer-Encoding: base64\r\n"
."Content-disposition: attachment; file=" . $ResumeFile . "\r\n" 
."\r\n" 
.chunk_split(base64_encode($file))
.$bound_last;

mail($to, $subject, $message, $header);
</pre>

<p><strong>end mail script</strong></p>

<p><strong>Email message</strong></p>

<p>Please see the attached resume file.</p>

<p>Incident Summary</p>

<p>Case Number: 0910071139</p>

<p>Category: Matters of Concern COT</p>

<p>UCR: 04.03</p>

<p>Location: 1310 W. Miracle Mile</p>

<p>Date: 10-07-09</p>

<p>Time: 1505</p>

<p>Officer: Smith / 13785</p>

<p>If you can see this MIME then your client doesn't accept MIME types!</p>

<p>--jacquie1003</p>

<p><strong>End of Email</strong></p>
