|
-
Copyleft Commie
postfix/sendmail difference with multipart mails
Hi, I'm having a little trouble getting multipart mails to work ok on postfix. I have an order receipt function which works fine on the test machines, however when I upload it to the webservers the mail mail is not html. Everything is just displayed as is.
The only noteworth difference between the machine config on the test and web servers is the fact that the test servers are running sendmail and postfix.
This is the setup for how I'm attempting to send the multipart mail.
PHP Code:
$boudary=md5(microtime()."MultipartBoundary");
$mail_body_html="\r\n--$boundary\r\nContent-Type: text/html;\r\n\r\n$mail_body_html";
$mail_text_text="\r\n--$boundary\r\nContent-Type: text/plain;\r\n\r\n$mail_body_text";
$Xheaders="Content-Type: Multipart/Alternative; boundary=\"$boundary\"\r\n$Xheaders";
mail($email_to_go, $subject, "\r\nThis is a multipart message\r\n\r\n$mail_body_text$mail_body_html\r\n--$boundary--","From: $from_name<$from_addr>\r\nReply-to: $reply_name<$reply_addr>\r\nMime-Version: 1.0\r\n$Xheaders);
Note: this is not all the code (obviously) and variables like $email_to_go etc have been set, also this is working on the test servers with no problem.
Are there any subtle (or not so subtle) differences with how sendmail and postfix handle the mails?
Thanks
Bubble
If at first it doesn't work, slap it with a dirty hack.
Moral of the week: Never let a moral of the week go on for more than a week, it's even sillier than feeding the admins.
My Blog
-
Copyleft Commie
Found out it was to do with some MTAs automatically making line feeds into carriage return line feeds, however when they come accross a carriage return line feed (what is supposed to be there) they replace it with a line feed line feed.
Crap!!
Bubble
If at first it doesn't work, slap it with a dirty hack.
Moral of the week: Never let a moral of the week go on for more than a week, it's even sillier than feeding the admins.
My Blog
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|