Page 1 of 1

Checking E-Mail health

Posted: 14 Nov 2011, 09:25
by GeroldK
I have configured async e-Mail notification running every 5 minutes.We recently had some issues where Mantis E-Mail notification would not work. The reasons were beyond Mantis (e.g. someone changed a password and didn't think of the consequences). Took 5 days to realize why bugtracking was so silent.

To avoid this, I would like to implement a daily Keepalive E-Mail. Now, to write a PowerShell script that sends an E-Mail from the server Mantis is running on takes me 5 mins, but leaves me unsatisfied
as this is only checking basic E-Mail function while Mantis is bypassed.

What I would like to do is - from a scheduled task - (without violating the integrity of the Mantis database) insert a corresponding record into the 'mantis_email_table' and off you go.

My question(s):

1. Is there a php module in Mantis that allows me to create an arbitrary mail? I'd prefer standard interfaces like this one.
2. If not, is there any conceivable problem in inserting such a record 'by hand' and have 'send_emails.php' do its work?

Thanks for the effort,

/Gerold

Re: Checking E-Mail health

Posted: 17 Nov 2011, 13:21
by GeroldK
Impatient as I am, I implemented a scheduled task which does the folllowing in mysql.exe

insert into mantis_email_table (email, subject, body,submitted, metadata) VALUES ('support@xxxxx.yy', 'Keepalive E-Mail from XXX Bugtracker', 'E-Mail Notification is functioning', 1, '') ;
quit

Ugly, but as long as I do not get any objections I have this in production running.

/Gerold

Re: Checking E-Mail health

Posted: 17 Nov 2011, 14:17
by atrol
There is a small weakness using your approach: You will get no email if no one is working with MantisBT and you did not set up to send email by cron job.
($g_email_send_using_cronjob = ON)

Read the instructions at http://www.mantisbt.org/wiki/doku.php/m ... il_queuing

Make a copy of send_emails.php and add the following line before email_send_all is called
email_store( "Recipient-Address", "YourSubject", "YourMessage");

Add a daily job to run your script.

Re: Checking E-Mail health

Posted: 18 Nov 2011, 16:16
by GeroldK
Thank you. I have the sebd_emails.php implemented (that's what I meant with async notification).
I implemented your suggestion which I prefer. It works fine.

Thanks again,

/Gerold K

Re: Checking E-Mail health

Posted: 14 May 2012, 23:17
by alijabeth
atrol wrote:There is a small weakness using your approach: You will get no email if no one is working with MantisBT and you did not set up to send email by cron job.
($g_email_send_using_cronjob = ON)

Read the instructions at http://www.mantisbt.org/wiki/doku.php/m ... il_queuing

Make a copy of send_emails.php and add the following line before email_send_all is called
email_store( "Recipient-Address", "YourSubject", "YourMessage");

Add a daily job to run your script.
Thank you for you great tips :)