Jump to content

Recommended Posts

i need to email the results of a form to out fax server as a HTML attachment and still have some text in the email, i got the attachment working but i cannot get anything into the email body.

 

]// Faxes the booking details to the vendor's fax number
mail( $VendorFaxNumberAndEmail, "", createFaxContent( $VendorEmailFaxContentArray[$y], $mime_boundary ), $FaxHeaders ) or $FaxSentToVendor = 0;




function createFaxContent( , $Message, $mime_boundary )
{

// Add a multipart boundary above the plain message
$CompletedFaxContent = "This is a multi-part message in MIME format.\n\n" .
					   "--{$mime_boundary}\n" .
					   "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
					   "Content-Transfer-Encoding: 7bit\n\n";



// Base64 encode the file data
$Message = chunk_split( base64_encode( $Message ) );


// Add file attachment to the message
$CompletedFaxContent .= "--{$mime_boundary}\n" .
					    "Content-Type: {text/html; charset=iso-8859-1};\n" .
					    " name=\"Booking Recipt.html\"\n" .
					    "Content-Transfer-Encoding: base64\n\n" .
					    $Message . "\n\n" .
					    "--{$mime_boundary}--\n";

return $CompletedFaxContent;

}

 

i am sure that it is something really stupid but any help would be appreciated

Link to comment
https://forums.phpfreaks.com/topic/188417-really-stupid-email-stuff/
Share on other sites

i dont think that is the problem but i'll try it.  just to make it more clear

 

i need to put text into the body of the email

 

everything that is going into the email is being sent as an attachment, all i need to do is put like a full stop or something into the body

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.