threads / discuss / 22553

Current stgit asks SMTP password for every patch

Subject: Current stgit asks SMTP password for every patch

## tl;dr

One message between Feb 7, 2010 and Feb 7, 2010.

replies: 0people: 1as markdown or json

Pavel Roskin· Feb 7, 2010, 02:18 UTC · lore
Hello, Alex!

I was unpleasantly surprised when the current STGit started asking me for the SMTP password for every patch in the series:

$ stg mail --to minicom ncurses-const..clobber Checking the validity of the patches ... done Sending patch "ncurses-const" ... Please enter SMTP password: done Sending patch "precision-int" ... Please enter SMTP password: done Sending patch "aliasing" ... Please enter SMTP password: done Sending patch "clobber" ... Please enter SMTP password: done

The code in __send_message_smtp() lacks any caching for the smtppassword variable. The code comes from your commit 89d7ec43e0b25cc6cbc9feb044d7ce7048f224eb stg mail: Refactor __send_message and friends

Ideally, asking for the password (as well as other verification of the e-mail credentials) should be done before "Sending patch" is shown, and before the cover letter if any. That is, it should be in func() in stgit/commands/mail.py.

But I'll also be fine with a simple-minded password caching in __send_message_smtp().

-- 
Regards,
Pavel Roskin

← back to recent threads