[v2.25.5] Mail sending works but not always [solved]

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Tagirijus
Posts: 33
Joined: 05 Dec 2017, 10:19
Contact:

[v2.25.5] Mail sending works but not always [solved]

Post by Tagirijus »

EDIT -----

Sorry for bothering; I think I have found out what it was: it is a plugin I wrote myself! I will do further tests, but for now I call the issue "solved". People: when testing: always test the workflow without plugins activated! :D

EDIT -----

Hey there,

I tried different kinds of settings - either keeping the default values or using config settings I found in the web or in this forum. Also I already tried almost every kind of setting I could find in the mantis settings area (e.g. the mail settings, of course) - nothing helped.

So what is the problem?
It seems that my Mantis install is able to send mails. I get mails, when I create a new account, etc. Also I can send a reminder for an issue so that the reminded user gets an email. I set up the admin to get mails for everything, yet the admin does not get new mails, when these things happen. E.g. changing the status for an issue or so: no mail ...

When I test it with a user account: sometimes the user gets mail, sometimes not. Is there maybe some kind of cooldown setting or so?


Here is an excerpt of my config_inc.php how it at the moment, regarding mail settings:

Code: Select all

$g_webmaster_email = 'todo@tagirijus.de';
$g_from_email = 'todo@tagirijus.de';
$g_from_name = 'TagiDo';
$g_email_send_using_cronjob = OFF;
The admin account has also the same mail address .. might this be a problem?

Again: I also tested everything with this $g_phpMailer_method = PHPMAILER_METHOD_SMTP; setting. Did not help at all.

I also enabled mail logging and so on: no errors were logged in all testing situations so far. I hope somebody can help me and maybe give me new ideas, what I could test - I really would appreciate it ... it took me hours already testing this, argh! :D

Thanks for any help! (=
Last edited by Tagirijus on 21 Jul 2022, 10:32, edited 1 time in total.
Tagirijus
Posts: 33
Joined: 05 Dec 2017, 10:19
Contact:

Re: [v2.25.5] Mail sending works but not always

Post by Tagirijus »

I think I found some kind of bug maybe: When switching a status of an issue, you can also enter a note. In that case neither the change of the status nor the note will call a mail notification. But if I only write a new note to the issue, the mail notification seem to work. Switching the status without entering a note does also not notify via mail. Updating the whole issue also does not notify (and again: it is enabled in the Mantis settings and also in the account of the users I tested this with). Is this a bug, or am I missing a configuration here?

It still feels very weird to me, since I basically enabled notifications for everything for the admin ... yet I seem to get very rare or even no notifications at all. )=
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: [v2.25.5] Mail sending works but not always [solved]

Post by atrol »

Set logging to

Code: Select all

$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_EMAIL_VERBOSE;
Please use Search before posting and read the Manual
Tagirijus
Posts: 33
Joined: 05 Dec 2017, 10:19
Contact:

Re: [v2.25.5] Mail sending works but not always [solved]

Post by Tagirijus »

atrol wrote: 21 Jul 2022, 20:21 Set logging to

Code: Select all

$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_EMAIL_VERBOSE;
Hey, thanks for the info. I already solved the "issue". It was due to one of my own plugins. To be more precise (in case it might help somebody in the future):

My plugin has a hook to EVENT_UPDATE_BUG, which happens in line 488 of bug_update.php: https://github.com/mantisbt/mantisbt/bl ... e.php#L488

The whole e-mail stuff happens after this line. My hook redirects to another page, though. This means that after this event the whole email handling from the bug_update.php file, won't be called at all.

My "fix" is monkey-patchy: I now just access the variables from line 496 to line 512 via "GLOBAL" inside my method, which the hook refers to and I copied the lines into my plugin method. It's most likely not the best solution, but for now it works.

Thanks again for your reply! (=
Post Reply