diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index baaff83c22..6f24b0a36f 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -3353,7 +3353,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p switch_input_args_t args = { 0 }; char *vm_email = NULL; char *vm_notify_email = NULL; - int send_mail = 0; cc_t cc = { 0 }; char *read_flags = NORMAL_FLAG_STRING; const char *operator_ext = switch_channel_get_variable(channel, "vm_operator_extension"); @@ -3415,8 +3414,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p skip_instructions = switch_true(val); } else if (!strcasecmp(var, "email-addr")) { email_addr = switch_core_session_strdup(session, val); - } else if (!strcasecmp(var, "vm-email-all-messages") && (send_main = switch_true(val))) { - send_mail++; } else if (!strcasecmp(var, "vm-storage-dir")) { vm_storage_dir = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "vm-domain-storage-dir")) { @@ -3425,8 +3422,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Using deprecated 'storage-dir' directory variable: Please use 'vm-domain-storage-dir'.\n"); storage_dir = switch_core_session_strdup(session, val); - } else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) { - send_mail++; } else if (!strcasecmp(var, "vm-disk-quota")) { disk_quota = atoi(val); } else if (!strcasecmp(var, "vm-alternate-greet-id")) { @@ -3462,12 +3457,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p } } - if (send_mail && (!(send_main || send_notify))) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, - "Falling back to leaving message locally due to too many misconfiguration.\n"); - send_mail = 0; - } - } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", id, domain_name); ok = 0; @@ -3574,7 +3563,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p if (argc >= 1 && argc <= 4) { switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]); /* the application still runs after we leave it so we need to make sure that we don't do anything evil */ - send_mail = 0; goto end; } } @@ -3588,7 +3576,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p if (argc >= 1 && argc <= 4) { switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]); /* the application still runs after we leave it so we need to make sure that we don't do anything evil */ - send_mail = 0; goto end; } }