From fedb948c86c20aa299fa7bab6b11ade209d6d814 Mon Sep 17 00:00:00 2001 From: Synchro Date: Sat, 6 Dec 2014 09:53:08 +0100 Subject: [PATCH] Don't set WordWrap in readme example, add comments about usage including 78 as a good value to use, fixes #327 --- README.md | 1 - class.phpmailer.php | 1 + examples/code_generator.phps | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0e6ba0616..a53b9ab43 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,6 @@ $mail->addReplyTo('info@example.com', 'Information'); $mail->addCC('cc@example.com'); $mail->addBCC('bcc@example.com'); -$mail->WordWrap = 50; // Set word wrap to 50 characters $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name $mail->isHTML(true); // Set email format to HTML diff --git a/class.phpmailer.php b/class.phpmailer.php index c891c3d03..d15a00022 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -149,6 +149,7 @@ class PHPMailer /** * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. * @type integer */ public $WordWrap = 0; diff --git a/examples/code_generator.phps b/examples/code_generator.phps index de04f0cc8..341a7d674 100644 --- a/examples/code_generator.phps +++ b/examples/code_generator.phps @@ -172,10 +172,10 @@ try { $example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;"; - $mail->WordWrap = 80; // set word wrap + $mail->WordWrap = 78; // set word wrap to the RFC2822 limit $mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images - $example_code .= "\n\$mail->WordWrap = 80;"; + $example_code .= "\n\$mail->WordWrap = 78;"; $example_code .= "\n\$mail->msgHTML(\$body, dirname(__FILE__), true); //Create message bodies and embed images"; $mail->addAttachment('images/phpmailer_mini.png', 'phpmailer_mini.png'); // optional name