Checked multiple discussions here but couldn’t find any that would fix the issue in my environment.
Tried using corporate SMTP settings for authenticated connection and anonymous, even installed STMP server (postfix) on erpmext machine and made appropriate changes in Email Domain settings. No improvement, getting same error:
SMTP AUTH extension not supported by server.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 420, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, encode(message))
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 195, in sess
(self.password or "").encode('utf-8'))
File "/usr/lib/python2.7/smtplib.py", line 585, in login
raise SMTPException("SMTP AUTH extension not supported by server.")
SMTPException: SMTP AUTH extension not supported by server.
Restarting OS apparently helped at least with SMTP server installed on same OS. Will report if last restart helped solving other scenarios.
EDIT
Still getting error even with successful settings:
Title
frappe.email.queue.flush
Error
SMTP AUTH extension not supported by server.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 420, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, encode(message))
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 195, in sess
(self.password or "").encode('utf-8'))
File "/usr/lib/python2.7/smtplib.py", line 585, in login
raise SMTPException("SMTP AUTH extension not supported by server.")
SMTPException: SMTP AUTH extension not supported by server.
EDIT:
Only localhost SMTP server works.
Reinstalled erpnext, will check if error keeps popping up.
EDIT
After erpnext reinstall no SMTP related errors were noticed, but only for localhost smtp server install.
SMTP still caused problems even after installing Postfix on ernext localhost.
Some destination servers bounce emails from internal servers causing 550 error.
By configuring Postfix to send via relay server (the default SMTP server) finally solved all issues realting to SMTP.
could you please share the connection settings (SSL yes/no, port) here? SMTP seems to work fine with SSL on Submission (Port 587), but fail on the standard port…
import smtplib
from email.mime.text import MIMEText
msg = MIMEText("Hello world")
me = 'name@companydomain.com'
you = 'name@gmail.com'
server = 'internaldomain'
msg['Subject'] = 'The HW'
msg['From'] = me
msg['To'] = you
password = ''
login = ''
# Send the message via our own SMTP server, but don't include the
# envelope header.
s = smtplib.SMTP(server.encode('utf-8'), None)
if login and password:
s.login(login.encode('utf-8'), password.encode('utf-8'))
s.sendmail(me, [you], msg.as_string())
s.quit()
In case of login and password being empty s.login( is not executed and everything is fine. If condition if login and password: to be deleted s.login( causes:
Traceback (most recent call last):
File "test_smtp.py", line 24, in <module>
s = s.login(login.encode('utf-8'), password.encode('utf-8'))
File "c:\Python27\lib\smtplib.py", line 586, in login
raise SMTPException("SMTP AUTH extension not supported by server.")
smtplib.SMTPException: SMTP AUTH extension not supported by server.
So if I understand correctly, the issue in frappe is that it doesn’t allow empty auth fields unless it’s localhost for given environment.