Python login error for email server authentication

I am on a Linux machine. My company has an email exchange server that is already configured. I am using a Python script to try logging into an email server so that I can send emails programmatically. Here is what I still have -

server = smtplib.SMTP('email-0.abc.com', 25) server.set_debuglevel(1) server.ehlo_or_helo_if_needed() server.login('abc/johndoe', 'pwd') 

However, in the server.login command, I get an error like

 raise SMTPException("No suitable authentication method found.") SMTPException: No suitable authentication method found. 

Does anyone know what the problem is, please?

thanks

+7
source share
2 answers

You may need to switch to STARTTLS authentication. Here is an example that helped me.

How to send email in Python via SMTPLIB

+4
source

It seems your mail server is rejecting a simple authentication method.

Which server are you using?

If MS Exchange see this article: http://www.exchangeinbox.com/article.aspx?i=93

+3
source

All Articles