[web2py] Sending emial via smtp

2018-03-05 Thread Vikash Pandey
if I go to command line on python cell then this code works fine. When I tested on python shell or on command line (This code wors fine I can get email via gmial SMTP) from gluon.tools import Mail mail = Mail() mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender =

[web2py] mail send error via API

2018-03-05 Thread Vikash Pandey
on commad line or using python shell This code works find and I can get email from gluon.tools import Mail # now we want to send email mail = Mail() mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = 'v...@gmail.com' mail.settings.login = 'v...@gmail.com:pass' mail.send() But