Hi Niphlod,

On 30/01/13 13:09, Niphlod wrote:
try with

mail.settings.server = 'gae'


Aargh!

That did it, and Googling that line took me straight to: -

http://stackoverflow.com/questions/2656068/sending-email-from-an-web2py-on-gae

...which I should have found at 8:30 this morning if my Google-Fu hadn't been on the fritz!

Those two options are working for me with the same conditional logic as applies to the database section at the top of db.py: -

if not request.env.web2py_runtime_gae:
    ## if NOT running on Google App Engine use sockets
    mail.settings.server = 'smtp.gmail.com:587'
else:
    ## connect use GAE
    mail.settings.server = 'gae'

I've gone back over my process, and I suspect that the accounts on GAE that I've already set up were set up before I changed the auth configuration, so the confusion has been entirely on my part.

I'm curious, though - given that the database switch is handled automagically in the script, is there a reason that the mail configuration should not also be handled conditionally, as above? My app is targeted at GAE, but I am also testing RDBMS back-ends as a fall back, so I'm switching back and forth all the time.

I'm so used to web2py looking after the db for me that I'm spoiled!

:-)

Thanks Alan and Niphlod!


--

Regards,

PhilK


e: [email protected] - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 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/groups/opt_out.


Reply via email to