Page 1 of 1

Email notification doesn't work with fresh install of 1.22

Posted: Tue Feb 07, 2006 2:52 am
by scliffe
Hi,

I'm new to ZoneMinder and I must say that I'm impressed.

I've just spent the morning tracking down why email notifications weren't working. My log file showed this:

Feb 6 21:17:45 lhq zmfilter[1841]: INF [Creating notification email]
Feb 6 21:17:45 lhq last message repeated 2 times

but it never actually sent the email.

The problem turned out to be that the default value of ZM_EMAIL_TXT is missing a double quote (") at the end of it. This results in $email_subject and $email_body not being set because the initialization statement in zmfilter.pl fails:

( $email_subject, $email_body ) = ZM_EMAIL_TEXT =~ /subject\s*=\s*"([^\n]*)".*body\s*=\s*"(.*)"/ms;

Adding the closing quote to fixed this. I checked the zm_create.sql script and confirmed that it's missing. It's also missing from ZM_MESSAGE_TXT too but I'm not using that yet.

Steve.

Posted: Tue Feb 07, 2006 5:14 am
by cordel
Thanks for that.
I know that it has been mentioned before and the fix I'm pretty sure is already in 1.22.1 that will be out.

Regards,
Corey

Posted: Wed Feb 08, 2006 1:37 am
by blacksmith
Thanks, Steve,

I thought you figure out the reason of the problem I got also.

Regards,
blacksmith

Posted: Tue Dec 12, 2006 10:11 am
by bujia
Hi!
I know that I can download ZM 1.22.1 to fix problem... but if I want to continue using ZM 1.22.0...can anyone write me the right row to substitute to this one in order to correct bug?

( $email_subject, $email_body ) = ZM_EMAIL_TEXT =~ /subject\s*=\s*"([^\n]*)".*body\s*=\s*"(.*)"/ms;

Thanks... and sorry for my level of competence......

Alex