-#ifdef MAILER
- if(getconf_seen(CNF_MAILTO) && strlen(getconf_str(CNF_MAILTO)) > 0 &&
- validate_mailto(getconf_str(CNF_MAILTO))) {
- mail_cmd = vstralloc(MAILER,
- " -s", " \"", _("AMANDA PROBLEM: PLEASE FIX"), "\"",
- " ", getconf_str(CNF_MAILTO),
- NULL);
- if((mailf = popen(mail_cmd, "w")) == NULL){
- g_printf(_("Mail failed\n"));
- error(_("could not open pipe to \"%s\": %s"),
+ if (mailer && *mailer != '\0') {
+ if (getconf_seen(CNF_MAILTO) && strlen(getconf_str(CNF_MAILTO)) > 0 &&
+ validate_mailto(getconf_str(CNF_MAILTO))) {
+ mail_cmd = vstralloc(mailer,
+ " -s", " \"", _("AMANDA PROBLEM: PLEASE FIX"), "\"",
+ " ", getconf_str(CNF_MAILTO),
+ NULL);
+ if ((mailf = popen(mail_cmd, "w")) == NULL) {
+ g_printf(_("Mail failed\n"));
+ error(_("could not open pipe to \"%s\": %s"),