php mail is getting cut off

后端 未结 2 1806
广开言路
广开言路 2021-01-03 15:11

I am sending a long HTML email via php\'s mail function on my localhost. It is consistently getting cut off and I can\'t figure out why.

Here\'s the code producing t

相关标签:
2条回答
  • 2021-01-03 15:45

    Check your mail() method, it should include your content-type, like:

    mail($email, 'Thank You for Contacting PHPglue', $msg, "From: PHPglue@PHPglue.com\r\ncontent-type: text/html");
    
    0 讨论(0)
  • 2021-01-03 15:57

    SMTP has a restriction on the length of lines, either 1024 or 2048 columns, I'm not sure. Put newlines (\r\n) periodically in your body. I suggest after each </tr>. This will have no effect on the way the table is rendered, but it should prevent the truncation.

    0 讨论(0)
提交回复
热议问题