[smtplib] how to assure login was succesful?

dieter dieter at handshake.de
Wed May 25 04:23:35 EDT 2016


maurice <mauricioliveiraguarda at gmail.com> writes:
> Once my python script reaches the point where I login in my email account with: server.login(username,password) (where server server = smtplib.SMTP('smtp.office365.com:587')), it returns a tuple like this:
>
> (235,
>  '2.7.0 Authentication successful target host [address here]')

Try a wrong login. I would expect you to get some kind of exception.




More information about the Python-list mailing list