Problem with email notifications
Moderators: Developer, Contributor
Problem with email notifications
Installed MantisBT 1.2.15 in two different places - one on a subdomain on GoDaddy and the other locally on a QNAP NAS. Both are exhibiting the same problem. I haven't included any email statements in my config_inc.php file so I am assuming the default values, from config_defaults_inc.php, are being used.
On both installs, which I started testing this morning, initially email notifications were received for both creating new users and creating new issues. This afternoon, when I came back to testing, creating new users will generate a notification email but creating a new issue or updating an issue will not.
I have seen other forum entries about email not working at all but has anyone seen this particular issue and have a fix/workaround for it?
Thanks.
On both installs, which I started testing this morning, initially email notifications were received for both creating new users and creating new issues. This afternoon, when I came back to testing, creating new users will generate a notification email but creating a new issue or updating an issue will not.
I have seen other forum entries about email not working at all but has anyone seen this particular issue and have a fix/workaround for it?
Thanks.
Re: Problem with email notifications
Check database table mantis_email_table.
There is a problem sending the emails if there are entries in it.
If it's empty MantisBT was able to sent (at least got no error return value).
Maybe the emails got marked as spam on their way to the recipient or on your email client.
There is a problem sending the emails if there are entries in it.
If it's empty MantisBT was able to sent (at least got no error return value).
Maybe the emails got marked as spam on their way to the recipient or on your email client.
Re: Problem with email notifications
On both databases, the mantis_email_table is empty. I am thinking it is safe to assume, then, that the emails have been sent. Is there anywhere in MantisBT where a log of emails sent/not sent is stored? I checked the junk/spam folders on the email clients but I don't see the missing mails there.Check database table mantis_email_table.
There is a problem sending the emails if there are entries in it.
If it's empty MantisBT was able to sent (at least got no error return value).
Maybe the emails got marked as spam on their way to the recipient or on your email client.
Any idea why the user creation emails still come through?
Re: Problem with email notifications
Maybe they don't fit the rule that might mark the other mails as spam.kofoster wrote: Any idea why the user creation emails still come through?
This seems to be no problem of MantisBT and no problem of your email client, but a problem of your email server.
Re: Problem with email notifications
I made some changes and there has been some progress. The change that made the most difference was that I added the statement "$g_enable_email_notification = ON;" to the config_inc.php file on both installs, first one and then the other. The effect was the same on both - now I am seeing notifications for assignment of issues and addition of notes and reminders to issues. There still isn't, however, any email notifications being sent when an issue is created.
I am not sure why adding the statement is making this difference since "$g_enable_email_notification = ON;" is supposed to be the default in the config_defaults_inc.php file. Could the problem be in this version of MantisBT or in the mailer package being used? There is another recent posting on this forum (http://www.mantisbt.org/forums/viewtopi ... =3&t=21916) that seems to suggest that there are issues with phpmailer 5.2.1, which is bundled in with MantisBT 1.2.15. The poster said they upgraded to phpmailer 5.2.4 and the problem went away. Someone else also posted that the next version of MantisBT (1.2.16) will bundle in phpmailer 5.2.6.
I am not sure why adding the statement is making this difference since "$g_enable_email_notification = ON;" is supposed to be the default in the config_defaults_inc.php file. Could the problem be in this version of MantisBT or in the mailer package being used? There is another recent posting on this forum (http://www.mantisbt.org/forums/viewtopi ... =3&t=21916) that seems to suggest that there are issues with phpmailer 5.2.1, which is bundled in with MantisBT 1.2.15. The poster said they upgraded to phpmailer 5.2.4 and the problem went away. Someone else also posted that the next version of MantisBT (1.2.16) will bundle in phpmailer 5.2.6.
Re: Problem with email notifications
Do you assign the issue when it's created?kofoster wrote:There still isn't, however, any email notifications being sent when an issue is created.
If not, who should receive the email?
No, if this would be the problem you would get no email. Hard to believe that $g_enable_email_notification = ON; in config_inc.php changed anything. Did you double check that config_defaults_inc.php is the original one from MantisBT 1.2.15 and contains nothing more than exactly one assignment of $g_enable_email_notification = ON; ? Maybe someone added a second one with OFF ?kofoster wrote:I am not sure why adding the statement is making this difference since "$g_enable_email_notification = ON;" is supposed to be the default in the config_defaults_inc.php file. Could the problem be in this version of MantisBT or in the mailer package being used?
Re: Problem with email notifications
I decided to start again from scratch so made a new install of MantisBT 1.2.15. I wasn't sure in what way the configuration changes I had made were affecting how Mantis was operating, hence the new install. I made no changes to the config_inc.php file. I added a project, a reporter user and a developer one. Emails were sent out for both user creations. I then used the reporter profile to create a new issue. No emails were sent but, after checking the manual again, it seems, out of the box, MantisBT is set up to not send any emails on issue creation. When I assign the issue or add notes to it, emails are sent to the respective users. So I am assuming, despite my own misunderstanding, that MantisBT is working as designed.
What I want is for someone, say a manager or developer or even the administrator, to be notified when a new issue is created. What configuration changes must I make to accomplish that?
What I want is for someone, say a manager or developer or even the administrator, to be notified when a new issue is created. What configuration changes must I make to accomplish that?
Re: Problem with email notifications
That's why I asked: Do you assign the issue when it's created?kofoster wrote:No emails were sent but, after checking the manual again, it seems, out of the box, MantisBT is set up to not send any emails on issue creation.
If not, who should receive the email?
Goto page Manage > Manage Configuration > E-mail Notifications
Enable the checkboxes In row "Status changes to 'new'" for the access levels you want.
Re: Problem with email notifications
That worked. Thanks for your help.
One additional question. Is there any way be more granular with this? What I would like to do is assign a different manager level user to each project and have each receive email notifications only for new issues created in their project(s).
Update: I made the settings, to send emails to manager assigned to the project on new issue creation, at the project level instead of at the global level and it seems to be working the way I want it to - send new issue email notification to manager level user assigned to the particular project and not to any other manager level user. Is this the correct configuration?
Once again thanks for helping me resolve, what turned out to be, my own misunderstanding.
One additional question. Is there any way be more granular with this? What I would like to do is assign a different manager level user to each project and have each receive email notifications only for new issues created in their project(s).
Update: I made the settings, to send emails to manager assigned to the project on new issue creation, at the project level instead of at the global level and it seems to be working the way I want it to - send new issue email notification to manager level user assigned to the particular project and not to any other manager level user. Is this the correct configuration?
Once again thanks for helping me resolve, what turned out to be, my own misunderstanding.
Re: Problem with email notifications
If anyone still faces issue or error while configuration add log level so that you can drill down the problem further. Below settings worked for me. Detailed explanation is written here
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_administrator_email = 'your-admin-email@gmail.com';
$g_webmaster_email = 'your-webmaster-email@gmail.com';
$g_return_path_email = 'your-return-email@gmail.com';
$g_from_email = 'your-from-email@gmail.com';
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_port = 465;
$g_smtp_connection_mode = 'ssl';
$g_smtp_username = 'username';
$g_smtp_password = 'password';
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/var/log/mantisbt.log';
$g_validate_email = OFF;