Hello,

Can any one please help.?
Iam trying to send gmail and got the below error.

WARNING:web2py:Mail.send failure:[Errno 10109] getaddrinfo failed

db.py:
## configure email
from gluon.tools import Mail
mail = Mail()
mail = auth.settings.mailer
mail.settings.server = 'smtp.webfaction.com:25'  
mail.settings.sender = 'email id given while signing up for Webfaction'
mail.settings.login = 'email id given while signing up for 
Webfaction:password of Webfaction'

And the script Iam trying to run is:

## in file /app/private/mail_queue.py
import time
while True:
    rows = db(db.queue.status=='pending').select()
    for row in rows:
        if mail.send(to=row.email,
            subject=row.subject,
            message=row.message):
            row.update_record(status='sent')
        else:
            row.update_record(status='failed')
        db.commit()
    time.sleep(60) # check every minute

What might be the mistake.?






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