Hello, I hope someone can shine a light on a snag I see...
I'm moving an app from an old host to a new host. The web2py application on 
the new server (web2py 2.16.1) is a copy of the existing (web2py 2.14.6). 
This includes the mail settings which used SMTP port 25
The app uses auth.mail which works fine on 2.14.6
But the exact same mail.settings do not work on the 2.16.4 server. The mail 
send fails.
The mail is driven by a background task as described in the book and I know 
it's running because my code inserts a "failed" status into my mailqueue 
table (i.e mail.send returns False)

The mail server is actually on my domain hosting account elsewhere (not on 
either app host), so I don't think it is related to moving the app to a 
different host.
However, to validate I have setup new email credentials on the new host 
which works OK on my PC desktop (so the credentials are correct). But 
web2py mail.send still fails.

The new host uses ssl (port 465) but also port 25. I have tried both in the 
mail.settings, and I have tried 465 with mail.settings.ssl = True. (Both 
hosts are on ssl)

It has the symptoms of a credentials problem except that the exact same 
mail credentials work on the old host on 2.14.6

The old server is
Apache 2.4.7 (at least that is what 'apache2 -v' returns)
Ubuntu 14.04
Web2py 2.14.6
Python 2.7 (and Python 3.4 reported)

The new server is
Apache 2.4.18
Ubuntu 16.10
Web2py 2.16.1
Python 2.7 (and Python 3.5 reported)

Note that the new server also runs a postfix MTA which I only use for 
crontab scripts. The old server didn't. However, mail.send is looking for a 
SMTP server and I can ping that server OK. Hence I think postfix is a red 
herring but I thought I would mention for completeness.

I can see mail.send returns True or False (and I used that to flag my 
"sent" or "failure" - as per the example in the book). However, I cannot 
identify where I might get more information diagnostic information from 
'mail.send' (over the True/False return)

I'm a bit stumped, so I am asking if anyone can give me any pointers as to 
where I need to look next? All tip, hits and advice gratefully received!

Thanks




-- 
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.

Reply via email to