I have posted this in general help before, but didn't get any help. I would like to try again.
I have a problem senting out emails. When I use the mail() function to sent out mail (either a html mail or a plain text mail). When the email body gets semi large(about 6000 characters), the email
content will be distorted. When I echo the email body, it's perfectly fine. But when I open it in outlook or yahoo mail, some extra text will be appended at the end or some text got deleted. The file I am senting is really not big, just 7K.
I suspect it has something to do with the virus protection from outlook or yahoo mail. When the email gets a certain size, it will try to break it up.
Has anyone experience this kind of problem?
I have seem articles mentioning breaking up the email body using soft break or = after every 1000 characters. I have tried, but didn't work for me.
This is my code:
$email_body in my application is a table, but if it gets large enough, any text will be distored.
$email_body ="<body>This is a test, blah, blah, blah....<BR>";
$email_body .="This is a test<BR>";
$email_body .="</BODY>";
$from_address = "jamieyupoon@yahoo.com";
$recipients = "jamieyupoon@yahoo.com";
$reply_to = "jamieyupoon@yahoo.com";
$subject = "Test";
$email_headers = "From:". $from_address;
$email_headers .= "\r\nReply-To:". $reply_to;
$email_headers .= "\nMIME-version: 1.0\n";
$email_headers .= "Content-type: text/html;";
$email_headers .= "boundary=\"Message-Boundary\"\n";
$email_headers .= "Content-transfer-encoding: 7Bits\n";
mail($recipients, $subject, $email_body, $email_headers);
For the content-transfer encoding, i have tried using various types, same problem occurs.
Please help!