diff options
author | Malcolm Davenport <malcolmd@digium.com> | 2004-06-30 17:49:42 +0000 |
---|---|---|
committer | Malcolm Davenport <malcolmd@digium.com> | 2004-06-30 17:49:42 +0000 |
commit | 3e2806114b170951897e05207c5f7a4de0f53e42 (patch) | |
tree | 9fe1052429a509914b6a8608e31fbced461f2ee0 /apps | |
parent | 2f911dfba62ff75ce929936591cd5756d17993c7 (diff) |
Bug # 1957. No more sending e-mails if the address isn't
present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 3736562e1..2ea415ac3 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -834,6 +834,11 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *m struct tm tm; struct vm_zone *the_zone = NULL; + if (vmu && (strchr(vmu->email, '@') == NULL)) { + ast_log(LOG_WARNING, "Invalid e-mail address %s. E-mail will not be sent.\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); |