View Issue Details

IDProjectCategoryView StatusLast Update
0011115mantisbtemailpublic2014-09-23 18:05
Reporterrgrr Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1.8 
Target Version1.2.12Fixed in Version1.2.12 
Summary0011115: phpmailer 2.3 breaks mail transmission
Description

...due to changed default $LE.

See Changelog of phpmailer:

Version 2.3 (November 06, 2008)

  • added Arabic language (many thanks to Bahjat Al Mostafa)
  • removed English language from language files and made it a default within
    class.phpmailer.php - if no language is found, it will default to use
    the english language translation
  • fixed public/private declarations
  • corrected line 1728, $basedir to $directory
  • added $sign_cert_file to avoid improper duplicate use of $sign_key_file
  • corrected $this->Hello on line 612 to $this->Helo
  • changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user
    if default is not acceptable
  • removed trim() from return results in EncodeQP
  • /test and three files it contained are removed from version 2.3
  • fixed phpunit.php for compliance with PHP5
  • changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg);
  • We have removed the /phpdoc from the downloads. All documentation is now on
    the http://phpmailer.codeworxtech.com website.
Additional Information

Solution for the problem is to add

$mail->LE = "\n";

around line 773 in email_api.php

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0006469 closeddregad Wrong email headers 
has duplicate 0004754 closeddregad phpmailer sends invalid characters in message body 

Activities

dhx

dhx

2009-11-03 19:00

reporter   ~0023561

\r\n is the correct line ending although some mail servers also work with \n (and others are probably so broken that they ONLY work with \n).

rgrr

rgrr

2009-11-04 03:31

reporter   ~0023566

Last edited: 2009-11-04 03:32

Right, but unfortunately mantis mail are transmitted as something like

<snip>
Return-Path: reinhard.griech@...

From: Mantis Bug Tracker reinhard.griech@...

Message-ID: 79f894e52f11d8cfe0e53574054dfaed@stchps462....

X-Priority: 3

X-Mailer: PHPMailer (phpmailer.codeworxtech.com) [version 2.3]

keywords: [...] Test

In-Reply-To: <fcc322775c772ce2b15a6e55ae04d889>

MIME-Version: 1.0

Content-Transfer-Encoding: 8bit

Content-Type: text/plain; charset="utf-8"

The following issue has been ASSIGNED.

======================================================================
<snap>

And that was the body, because the additional blank lines broke the header.

This all is at least true for my smail smtp gateway. The phpmailer version before worked for me.

giallu

giallu

2009-11-05 06:41

reporter   ~0023588

Looks like 0006469?

rgrr

rgrr

2009-11-09 03:47

reporter   ~0023620

If you were asking me: may be...

But: I really don't know, how phpmailer will expand correct line delimiters. Perhaps it is expanding a (correct) "\r\n" to "\r\r\n"?

This would explain the following error message in /var/log/smail/logfile:

11/02/2009 14:14:49: [7787] [m1N4wkD-004C79C] Received FROM:reinhard.griech@... PROGRAM:sendmail ORIG-ID:<a920425c475366284c594b4b914cea20@...
11/02/2009 14:14:49: [7788] [m1N4wkD-004C79C] Failed TO:reinhard.griech@...^M ERROR:(ERR111) illegal character in hostname
11/02/2009 14:14:49: [7789] [m1N4wkD-004CjkC] Received FROM:<+> HOST:stchps462.stch.endress.com PROTOCOL:bsmtp PROGRAM:smail SIZE:59073
11/02/2009 14:14:49: [7789] [m1N4wkD-004CjkC] remote got QUIT from <no-ident>@...
11/02/2009 14:14:50: [7791] [m1N4wkD-004CjkC] Delivered VIA:isf6.infoserve.endress.com TO:reinhard.griech@... ROUTER:smart_host TRANSPORT:smtp
11/02/2009 14:14:50: [7791] [m1N4wkD-004CjkC] Completed.
11/02/2009 14:14:50: [7788] [m1N4wkD-004C79C] Returned error FOR:reinhard.griech@...^M TO:reinhard.griech@...
11/02/2009 14:14:50: [7788] [m1N4wkD-004C79C] Completed.

rgrr

rgrr

2009-11-24 05:02

reporter   ~0023797

Could be related to 0010253

Also 0004754 mentioned \r\n , \n problems. I guess, that 0004754 can be closed though. It's on feedback and last change was on January 2007.

dregad

dregad

2012-08-17 06:26

developer   ~0032599

This should be fixed in recent versions of PHPMailer.

Feel free to reopen if this can be reproduced in 1.2.12 (not yet released as of this writing, try a nightly build)

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036183

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 8c81d4ca

2012-08-16 04:32

dregad


Details Diff
Upgrade PHPMailer from 5.1 to 5.2.1

Version 5.2.1 (January 16, 2012)
* Closed several bugs
* Performance improvements
* MsgHTML() now returns the message as required.
* New method: GetSentMIMEMessage() (returns full copy of sent message)

Version 5.2 (July 19, 2011)
* protected MIME body and header
* better DKIM DNS Resource Record support
* better aly handling
* htmlfilter class added to extras
* moved to Apache Extras

Fixes 0012562
Affected Issues
0011115, 0012562
mod - library/README.libs Diff File
mod - library/phpmailer/README Diff File
mod - library/phpmailer/class.phpmailer.php Diff File
mod - library/phpmailer/class.pop3.php Diff File
mod - library/phpmailer/class.smtp.php Diff File
mod - library/phpmailer/language/phpmailer.lang-br.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ca.php Diff File
mod - library/phpmailer/language/phpmailer.lang-cz.php Diff File
mod - library/phpmailer/language/phpmailer.lang-de.php Diff File
mod - library/phpmailer/language/phpmailer.lang-dk.php Diff File
mod - library/phpmailer/language/phpmailer.lang-es.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fi.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fo.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fr.php Diff File
mod - library/phpmailer/language/phpmailer.lang-hu.php Diff File
mod - library/phpmailer/language/phpmailer.lang-it.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ja.php Diff File
mod - library/phpmailer/language/phpmailer.lang-nl.php Diff File
mod - library/phpmailer/language/phpmailer.lang-no.php Diff File
mod - library/phpmailer/readme_mantis.txt Diff File

MantisBT: master a4f644c9

2012-08-16 04:32

dregad


Details Diff
Upgrade PHPMailer from 5.1 to 5.2.1

Version 5.2.1 (January 16, 2012)
* Closed several bugs
* Performance improvements
* MsgHTML() now returns the message as required.
* New method: GetSentMIMEMessage() (returns full copy of sent message)

Version 5.2 (July 19, 2011)
* protected MIME body and header
* better DKIM DNS Resource Record support
* better aly handling
* htmlfilter class added to extras
* moved to Apache Extras

Fixes 0012562
Affected Issues
0011115, 0012562
mod - library/README.libs Diff File
mod - library/phpmailer/README Diff File
mod - library/phpmailer/class.phpmailer.php Diff File
mod - library/phpmailer/class.pop3.php Diff File
mod - library/phpmailer/class.smtp.php Diff File
mod - library/phpmailer/readme_mantis.txt Diff File