Home Email My Account

PHP mail function fails with "message has lines too long for transport"

Symptom: Bounce back message received when sending email using PHP mail. 

Cause: Email providers like Outlook will reject the message if the recipient does not have wordwrap enabled for HTML emails and the email contain lines longer than 65 characters.

Solution: Use the wordwrap function to wordwrap your message.

Example: $message = wordwrap($message, 70,"\r\n");

Last Updated: September 13, 2022

Comments

First Name:*
Last Name:*
Email:*
Comment:
Rating:

Domain Registration

Hosting

Website Builder

Web Design

SSL Certificates

Website Security

Microsoft 365

SEO

Email Marketing

Contact Support

WHOIS

© 2025 Fagan Media