I'm trying to send a mail in web2py but nothing happens.
Here is my code:
from gluon.tools import Mail
mail = Mail()
def sendMail():
mail.settings.server = 'smtp.yahoo.com:465'
mail.settings.sender = 'mymail@yahoo.com'
mail.settings.login = 'abc:password'
mail.send(to='a@gmail.com', subject='Hello', message='You've received a mail.')
Does anyone have any ideea what I'm doing wrong?