I don't know what the problem is but have you tried putting the domain that
will be emailing in mail.settings.hostname?
I usually manually test when I have these problems. Example of a manual
test for a server using TLS in the python command line:
>>> server = smtplib.SMTP('yourdomain.com', 587)
>>> server.ehlo()
(250, 'vps.testing.com Hello 89-180-88-3.net.novis.pt [89.180.88.3]\nSIZE
52428800\nPIPELINING\nAUTH PLAIN LOGIN\nSTARTTLS\nHELP')
>>> server.starttls()
(220, 'TLS go ahead')
>>> server.login('[email protected]', 'multipass')
(235, 'Authentication succeeded')
>>> server.sendmail('[email protected]',
'[email protected]', 'teeheee')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/smtplib.py", line 721, in sendmail
self.rset()
File "/usr/lib64/python2.7/smtplib.py", line 460, in rset
return self.docmd("rset")
File "/usr/lib64/python2.7/smtplib.py", line 385, in docmd
return self.getreply()
File "/usr/lib64/python2.7/smtplib.py", line 361, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
This example failed because the server.ehlo() didn't have the correct
hostname and it used the default which is the machine hostname (not your
website domain) this problem would be solved by setting
mail.settings.hostname correctly.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.