Skip to content Skip to sidebar Skip to footer

Php Email Interrupted If Content Exceeds Certain Limit

I am using PHP mail() to send daily notice emails. But I noticed that if the string, which stores the content of the mail, is too long, the email will be interrupted, i.e. only pa

Solution 1:

Try with the following script:

mail($to, $subject, chunk_split(base64_encode($message), "Content-Transfer-Encoding: base64\r\n");

Explanations:

  • The email standard RFC2822 accepts only 998 chars of length per line.
  • Email clients can read base64 encoded strings better.

Cheers!

Post a Comment for "Php Email Interrupted If Content Exceeds Certain Limit"