Bug #1957. Take two
authorMalcolm Davenport <malcolmd@digium.com>
Wed, 30 Jun 2004 18:30:10 +0000 (18:30 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Wed, 30 Jun 2004 18:30:10 +0000 (18:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 48b8665..2ee4477 100755 (executable)
@@ -833,7 +833,10 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *m
        time_t t;
        struct tm tm;
        struct vm_zone *the_zone = NULL;
-       
+       if (vmu && !ast_strlen_zero(vmu->email)) {
+               ast_log(LOG,WARNING, "E-mail address missing for mailbox [%s].  E-mail will not be sent.\n", vmu->mailbox);
+               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);