Index: app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.120 diff -u -p -r1.120 app_voicemail.c --- app_voicemail.c 29 Jun 2004 13:12:18 -0000 1.120 +++ app_voicemail.c 30 Jun 2004 17:13:59 -0000 @@ -834,6 +834,12 @@ static int sendmail(char *srcemail, stru struct tm tm; struct vm_zone *the_zone = NULL; + if (vmu && (strchr(vmu->email, '@') == NULL)) { + ast_log(LOG_WARNING, "Invalid email address %s. Not sending email.\n", + vmu->email); + return(0); + } + if (!strcmp(format, "wav49")) format = "WAV"; ast_log(LOG_DEBUG, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, attach_voicemail);