Hello everyone.

I am quite desperate. I can not send email using smtp.gmail.com. Nothing 
seams to be working. I use a gmail smtp account which is working fine on my 
server when I use a basic python script, or even a php script on my Apache 
2.4. But is not not working with Web2py. I do not have the 2 identification 
activated on gmail.



*What i did : *I created a news application. In the db.py file, I have put 
the following lines :

from gluon.tools import Auth, Service, PluginManager

auth = Auth(db)
service = Service()
plugins = PluginManager()

## create all tables needed by auth if not custom tables
auth.define_tables(username=False, signature=False)

## configure email
mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = 'exx...@gmail.com'
mail.settings.login = 'exx...@gmail.com:XXXXX'


In the default.py file, I just put the following line :

def index():

    mail.send('exx...@gmail.com','Subject','Message')
   
    response.flash = T("Hello World")
    return dict(message=T('Welcome to web2py!'))


I have not error messages, but no mail was sent.

Any idea ?

Thank you very much.

------------------
Version 

2.14.6-stable+timestamp.2016.05.10.00.21.47
(Running on Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.10 mod_wsgi/4.4.12 
Python/2.7.10, Python 2.7.10) 


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to