As title.
I can send mail via this example.
18.1.11. email: Examples 
<https://docs.python.org/2/library/email-examples.html>

But when I use web2py framework and follow this guide
Email and SMS 
<http://web2py.com/books/default/chapter/34/08/email-and-sms#Sending-messages-using-a-background-task>

I can't send my mail and I don't have any log on my smtp server.

Here is the web2py controller code

def helloMail():
    view = _VIEW_VARIABLES
    response.view = 'testMail.html'
    mail = Mail()
    mail.settings.server = 'localhost'
    mail.settings.sender = 'sendermail'
    mail.settings.login = None
    mailListener = mail.send(to=['reciver mail'],
      subject='hello',
      message='hi there')

    return dict(view=view, mailListener = mailListener)

Please help me to send mail by web2py. 
P.S. I also use local SMTP in python code

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