summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-09-09 20:23:56 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-09-09 20:23:56 +0200
commit99d9f50a0000447d0a752e6c43716237dc0da176 (patch)
tree0b958b9711d09c4da74f076e1b902ffa32a4a0a1 /program/steps/mail/sendmail.inc
parenta1303514933afe2d867067e4b95412c79652c89b (diff)
parent4e383e2ec8b4184c0fe74d02cf30fd3a4078128e (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc15
1 files changed, 3 insertions, 12 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 70f1af714..577751742 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -511,14 +511,9 @@ if ($isHtml) {
$h2t = new html2text($plugin['body'], false, true, 0);
$plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n");
$plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true);
- if (!$plainTextPart) {
- // empty message body breaks attachment handling in drafts
- $plainTextPart = "\r\n";
- }
- else {
- // make sure all line endings are CRLF (#1486712)
- $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);
- }
+
+ // make sure all line endings are CRLF (#1486712)
+ $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);
$plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body',
array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME));
@@ -542,10 +537,6 @@ else {
$message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n");
$message_body = wordwrap($message_body, 998, "\r\n", true);
- if (!strlen($message_body)) {
- // empty message body breaks attachment handling in drafts
- $message_body = "\r\n";
- }
$MAIL_MIME->setTXTBody($message_body, false, true);
}