1 Without this patch mutt fails to send messages and ask for a password even if
2 smtp_user and smtp_pass are defined in .muttrc, see upstream bug
3 http://bugs.mutt.org/3289
8 else if ((account->type == M_ACCT_TYPE_POP) && PopUser)
9 strfcpy (account->user, PopUser, sizeof (account->user));
11 + else if (option (OPTNOCURSES))
13 /* prompt (defaults to unix username), copy into account->user */
17 else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass)
18 strfcpy (account->pass, SmtpPass, sizeof (account->pass));
20 + else if (option (OPTNOCURSES))
24 snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
29 snprintf (prompt, sizeof (prompt), "%s: ", interaction->prompt);
31 - if (mutt_get_field (prompt, resp, sizeof (resp), 0))
32 + if (option (OPTNOCURSES) || mutt_get_field (prompt, resp, sizeof (resp), 0))
35 interaction->len = mutt_strlen (resp)+1;
45 fp = fopen (msgfile, "r");
51 - if (!(conn->account.flags & M_ACCT_PASS) && option (OPTNOCURSES))
53 - mutt_error (_("Interactive SMTP authentication not supported"));
57 return smtp_auth (conn);
59 mutt_error (_("SMTP authentication requires SASL"));
63 strfcpy (buf + len, "\r\n", sizeof (buf) - len);
64 - } while (rc == smtp_ready);
65 + } while (rc == smtp_ready && saslrc != SASL_FAIL);
67 if (smtp_success (rc))