Slow email sending

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
alexswamp
Posts: 3
Joined: 07 Feb 2022, 07:36

Slow email sending

Post by alexswamp »

Hi everyone,

I using mantis and i notice if I perform an operation that involves sending an email, the page will go down and it will take minutes for the email to be sent. I using SMTP setting. Does any idea why do it?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Slow email sending

Post by cas »

can be a variety of reasons like your mailhost not performing very well.
Better is to setup mail in the background with the following setting:
$g_email_send_using_cronjob = ON;
of course you need to setup the background job to take care of it (see admin manual)
alexswamp
Posts: 3
Joined: 07 Feb 2022, 07:36

Re: Slow email sending

Post by alexswamp »

cas wrote: 07 Feb 2022, 09:12 can be a variety of reasons like your mailhost not performing very well.
Better is to setup mail in the background with the following setting:
$g_email_send_using_cronjob = ON;
of course you need to setup the background job to take care of it (see admin manual)
We have 2 mantis and 2 mail server with the same settings (but different network access /2 company/).
Everything works fast at one but the other have performance problem.

I logging the old events. Thats my log (From settings: $g_enable_email_notification = ON;):

Code: Select all

2022-02-08 10:11 CET MAIL email_api.php:979 email_bugnote_add() Note ~1029 added to issue #430
2022-02-08 10:11 CET RECIPIENT email_api.php:285 email_collect_recipients() Issue = #430, add @U3 (reporter)
2022-02-08 10:11 CET RECIPIENT email_api.php:295 email_collect_recipients() Issue = #430, add @U3 (handler)
2022-02-08 10:11 CET RECIPIENT email_api.php:342 email_collect_recipients() Issue = #430, add @U3 (note author)
2022-02-08 10:11 CET RECIPIENT email_api.php:357 email_collect_recipients() Issue = #430, add @U6 (based on access level)
2022-02-08 10:11 CET RECIPIENT email_api.php:429 email_collect_recipients() Issue = #430, drop @U3 (own action)
Now i testing with cron job. I hope its help to me.

Code: Select all

officiumit@mantis:~$ time php /var/www/projekt/scripts/send_emails.php
Sending emails...
Done.

real    0m41.653s
user    0m0.106s
sys     0m0.020s
Last edited by alexswamp on 08 Feb 2022, 09:35, edited 1 time in total.
Post Reply