Megajuz3003 Posted January 14, 2010 Share Posted January 14, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/188417-really-stupid-email-stuff/ Share on other sites More sharing options...
premiso Posted January 14, 2010 Share Posted January 14, 2010 I am not sure if this is a valid header: "Content-Type: {text/html; charset=iso-8859-1};\n" . I think you should remove the { } and see if that works. It may be ok, but I have never seen it done that way before. Quote Link to comment https://forums.phpfreaks.com/topic/188417-really-stupid-email-stuff/#findComment-994688 Share on other sites More sharing options...
Megajuz3003 Posted January 14, 2010 Author Share Posted January 14, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/188417-really-stupid-email-stuff/#findComment-994697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.