From c07cb4cc3493c407214415de656a6af545ef822f Mon Sep 17 00:00:00 2001 From: Rocco Rutte Date: Wed, 1 Jul 2009 21:35:13 +0200 Subject: [PATCH] SMTP: use $smtp_pass in batch mode. Closes #3289. mutt_account_getpass() copying the password from $smtp_pass into the account structure is only called from the SASL callback we only use if we're sure we don't need curses (i.e. have the pass already). --- ChangeLog | 12 ++++++++++++ smtp.c | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 71aa95b3..68bf4cf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-06-30 17:32 +0200 Rocco Rutte (f4baa2f1251a) + + * pgpewrap.c: Add missing config.h include to pgpewrap.c + + It technically doesn't need it, but pgpewrap should be rebuilt after + configure ran, too. + +2009-06-30 17:31 +0200 Rocco Rutte (7c8f018d33a5) + + * doc/Makefile.am: Manual: Run lynx with --display_charset + =us-ascii, see #3286. + 2009-06-29 18:20 +0000 Rocco Rutte (03c65df651e0) * UPDATING, doc/manual.xml.head: Manual: Move new mail detection into diff --git a/smtp.c b/smtp.c index 9d096a39..d0b2eb50 100644 --- a/smtp.c +++ b/smtp.c @@ -172,7 +172,7 @@ smtp_data (CONNECTION * conn, const char *msgfile) progress_t progress; struct stat st; int r, term = 0; - size_t buflen; + size_t buflen = 0; fp = fopen (msgfile, "r"); if (!fp) @@ -347,6 +347,12 @@ static int smtp_fill_account (ACCOUNT* account) if (url.scheme == U_SMTPS) account->flags |= M_ACCT_SSL; + if (!(account->flags & M_ACCT_PASS) && SmtpPass && *SmtpPass) + { + strfcpy (account->pass, SmtpPass, sizeof (account->pass)); + account->flags |= M_ACCT_PASS; + } + if (!account->port) { if (account->flags & M_ACCT_SSL) -- 2.40.0