View Issue Details

IDProjectCategoryView StatusLast Update
0012562mantisbtemailpublic2013-04-06 08:41
Reportervogt Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
OSUbuntuOS Version08.04 
Product Version1.2.3 
Target Version1.2.12Fixed in Version1.2.12 
Summary0012562: Mail sent without from address set in config
Description

When someone tries to sign up to my mantis installation or I reset the password of someone mantis tries to deliver an email to the user. However this fails as the e-mail does not have the envelope sender set to the g_from_email address address. Instead it uses "www-data@host.example.com" with host.example.com being the hostname of my server.

As (accidentally) my DNS server is not configured to include host.example.com the SMTP server of the receiver refuses to accept the e-mail because host.example.com does not exist. The bounce is not delivered because www-data is not a valid email address on my server.

I use PHP5.2.4, PHPMAILER_METHOD_MAIL and postfix for delivery.

I have traced this problem down into class.phpmailer.php. The function MailSend has four mail() calls depending on various conditions. The fourth call in line 677 seems to be missing the final parameter $params.

I have added this parameter and now it works correctly, delivering e-mails showing the correct envelope sender in the logs. Context diff added.

Steps To Reproduce

Log in as administrator, manage users, press the reset password button, check the email logs.

Additional Information

Context diff.
*** class.phpmailer.php.ORIG Tue Sep 14 20:40:10 2010
--- class.phpmailer.php Thu Nov 25 07:55:34 2010


* 674,680 **
$this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
}
} else {
! $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
// implement call back function if it exists
$isSent = ($rt == 1) ? 1 : 0;
$this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);
--- 674,680 ----
$this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body);
}
} else {
! $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
// implement call back function if it exists
$isSent = ($rt == 1) ? 1 : 0;
$this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

atrol

atrol

2010-11-28 09:36

developer   ~0027499

PHPMailer is a 3rd party library
Please enter your issue also at http://sourceforge.net/tracker/?group_id=26031&atid=385707

vogt

vogt

2010-12-13 14:03

reporter   ~0027587

https://sourceforge.net/tracker/?func=detail&aid=3136711&group_id=26031&atid=385707

dregad

dregad

2012-08-17 05:12

developer   ~0032597

This problem is fixed in the latest release of PHPMailer.

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036171

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