MantisBT

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014211mantisbtintegrationpublic2012-05-03 11:292012-08-26 16:16
Reportermatthewfoust 
Assigned Todregad 
PriorityhighSeveritymajorReproducibilityhave not tried
StatusclosedResolutionunable to reproduce 
PlatformOSMac OS XOS Version10.6.8 & 10.7.3
Product Version1.2.9 
Target VersionFixed in Version 
Summary0014211: phpmailer generates spurious (?) error
Description- verified in version 1.2.9 and previous releases of 1.2
- verified on Mac OS X 10.6.8 & 10.7.3
- mailserver software: Kerio Connect, multiple versions

PHPMailer generates the error below when any email notification is sent. Emails are sent successfully. Mostly, this is an annoyance because users are not directed to the expected pages after entering or updating bugs.

Fatal error: Call to undefined method SMTP::getError() in /opt/local/apache2/htdocs/mantis/library/phpmailer/class.phpmailer.php on line 1910
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0031753)
matthewfoust (reporter)
2012-05-03 11:50

$g_phpMailer_method is set to 2 (SMTP)

This has always been our config and never exhibited this issue previously.
User avatar (0031758)
matthewfoust (reporter)
2012-05-03 21:39

Discovered the error generated by the mail server. It was attempting to send an email to a user in a distribution group whose account did not exist. PHPMailer should be able to deal with this gracefully.

[03/May/2012 20:04:08][2987397120] {smtps} SMTP server session begin; client connected from 127.0.0.1:59087
[03/May/2012 20:04:08][2987397120] {smtps} Sent SMTP greeting to 127.0.0.1:59087
[03/May/2012 20:04:08][2987397120] {smtps} Command EHLO SERVER.XXXXX.net
[03/May/2012 20:04:08][2987397120] {smtps} Sent reply to EHLO: 250 mail.XXXXX.com ...
[03/May/2012 20:04:08][2987397120] {smtps} Command MAIL FROM:<GROUP@XXXXX.com>
[03/May/2012 20:04:08][2987397120] {smtps} Sent reply to MAIL: 250 2.1.0 Sender <GROUP@XXXXX.com> ok
[03/May/2012 20:04:08][2987397120] {smtps} Command RCPT TO:<NONEXISTENTUSER@XXXXX.com>
[03/May/2012 20:04:08][2987397120] {smtps} Sent reply to RCPT: 550 5.1.1 Mailbox <NONEXISTENTUSER@XXXXX.com> does not exist
User avatar (0031759)
dregad (developer)
2012-05-04 03:28

MantisBT just bundles phpmailer as-is, but we do not maintain it. If you are using our release tarballs, then you should be on version 5.1 (October 20, 2009).

I suggest that you report the issue upstream to the phpmailer development team, post the reference here for tracking, and if a future release of the package fixes your issue, let us know so we can include the updated version in our distribution.
User avatar (0031765)
matthewfoust (reporter)
2012-05-05 22:09

Will do.

BTW, my previous note was erroneous. It was indeed Mantis>PHPMailer attempting to deliver a message to the users whose account was no longer active. I thought the error was the mailserver trying to look up the user in the distro group, but it was Mantis attempting to directly send an email to that user. The email account in question was linked to a user in Mantis, but that user's mantis account was not enabled. Thus, there is a legitimate issue here in that Mantis was attempting to deliver a message to a user with a disabled account.
User avatar (0031768)
dregad (developer)
2012-05-06 05:34

Matthew,

Following your comment
> The email account in question was linked to a user in Mantis, but that user's mantis account was not enabled.
> Thus, there is a legitimate issue here in that Mantis was attempting to deliver a message to a user with a disabled account.

I just made the following test here on my dev box:

Setup:
- enable logging in config_inc.php: $g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
- create user "test_user" (enabled for now)
- make "test_user" monitor test issue 10

Test 1: mail notifications sent successfully to active user
- add a note to issue 10
- review log - mail has been sent to user
2012-05-06 11:17 CEST mail_recipient Issue = #10, add Reporter = @U2
2012-05-06 11:17 CEST mail_recipient Issue = #10, add Monitor = @U7
2012-05-06 11:18 CEST mail_recipient Issue = #10, add Note Author = @U2
2012-05-06 11:17 CEST mail_recipient Issue = #10, drop @U2 (no email)
2012-05-06 11:17 CEST mail Issue = #10, Type = bugnote, Msg = 'email_notification_title_for_action_bugnote_submitted', 
User = @U7, Email = 'test_user@localhost'.


Test 2: mail not sent to disabled user
- disable "test_user"
- add a note to issue 10
- review log - mail has NOT been sent to user
2012-05-06 11:18 CEST mail_recipient Issue = #10, add Reporter = @U2
2012-05-06 11:18 CEST mail_recipient Issue = #10, add Monitor = @U7
2012-05-06 11:18 CEST mail_recipient Issue = #10, add Note Author = @U2
2012-05-06 11:18 CEST mail_recipient Issue = #10, drop @U2 (no email)
2012-05-06 11:18 CEST mail_recipient Issue = #10, drop @U7 (disabled)


So MantisBT does NOT send mail to disabled users, as should be expected. Note that my test was made on latest dev trunk, but since this code has not been modified for ages it would be the same on 1.2.9.

Unless you can provide steps to reproduce your problem, I'm afraid there's not much I can do for you.
User avatar (0032591)
dregad (developer)
2012-08-17 04:09

As you have not provided any feedback, I am resolving this as unable to reproduce. Feel free to reopen if you are able to provide additional information as requested previously.

- Issue History
Date Modified Username Field Change
2012-05-03 11:29 matthewfoust New Issue
2012-05-03 11:49 matthewfoust Sponsorship Added matthewfoust: US$ 10
2012-05-03 11:49 matthewfoust Sponsorship Total 0 => 10
2012-05-03 11:50 matthewfoust Note Added: 0031753
2012-05-03 21:39 matthewfoust Note Added: 0031758
2012-05-04 03:28 dregad Note Added: 0031759
2012-05-04 03:28 dregad Status new => acknowledged
2012-05-05 22:09 matthewfoust Note Added: 0031765
2012-05-06 05:34 dregad Note Added: 0031768
2012-08-17 04:09 dregad Note Added: 0032591
2012-08-17 04:09 dregad Status acknowledged => resolved
2012-08-17 04:09 dregad Resolution open => unable to reproduce
2012-08-17 04:09 dregad Assigned To => dregad
2012-08-26 16:16 atrol Status resolved => closed


MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.0836 seconds.
memory usage: 2,799 KB
Powered by Mantis Bugtracker