I am having difficulty sending an e-mail using the PHP mail function with a message length exceeding 10,000 characters. A message with a length of 10,000 characters works, but one with a length of 20,000 characters doesn’t. I have checked with my Web Host Provider, 1and1 Internet, and have been told that they place no limit on the length of e-mails sent.
Any ideas please?
PHP Mail Message Length Problem
Moderator: General Moderators
Re: PHP Mail Message Length Problem
the only restraint that i know of for the mail() function is that lines should be no longer than 70 chraracters
- getmizanur
- Forum Commoner
- Posts: 71
- Joined: Sun Sep 06, 2009 12:28 pm
Re: PHP Mail Message Length Problem
Far as I know there is no restriction on number character allowed by mail server however there may be limit on number of characters per line. Have you tried adding '\r\n' at the end of each line
Code: Select all
$html = "<html>";
$html .= "<p>long string</p>\r\n";
$html .= "<p>another long string</p>\r\n";
$html .= "</html>"
$to = "blah@blah.com";
$subject = "blah..."
mail($to, $subject, $html);