Email notification doesn't work with fresh install of 1.22

Support and queries relating to all previous versions of ZoneMinder
Locked
scliffe
Posts: 1
Joined: Tue Feb 07, 2006 1:11 am

Email notification doesn't work with fresh install of 1.22

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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
blacksmith
Posts: 15
Joined: Wed Feb 01, 2006 12:53 pm

Post by blacksmith »

Thanks, Steve,

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

Regards,
blacksmith
bujia
Posts: 46
Joined: Sat Jul 23, 2005 4:29 pm

Post 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
Locked