Checking E-Mail health

General discussion of Mantis.

Moderators: Developer, Contributor

Checking E-Mail health

Postby GeroldK » Nov 14, 2011 4:25 am

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
GeroldK
 
Posts: 14
Joined: Jul 30, 2009 7:12 am

Re: Checking E-Mail health

Postby GeroldK » Nov 17, 2011 8:21 am

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
GeroldK
 
Posts: 14
Joined: Jul 30, 2009 7:12 am

Re: Checking E-Mail health

Postby atrol » Nov 17, 2011 9:17 am

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.
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3635
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Checking E-Mail health

Postby GeroldK » Nov 18, 2011 11:16 am

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
GeroldK
 
Posts: 14
Joined: Jul 30, 2009 7:12 am

Re: Checking E-Mail health

Postby alijabeth » May 14, 2012 6:17 pm

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 :)
alijabeth
 
Posts: 1
Joined: May 14, 2012 5:55 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron