Email notification doesn't work with fresh install of 1.22
Posted: Tue Feb 07, 2006 2:52 am
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.
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.