On Saturday, July 4, 2015 at 4:45:24 AM UTC-7, reddyreddy wrote: > > Hi > Iam uing the same settings as yours in db.py. But I got the following > error. > > Error 10060: A connection attempt failed. >
You're using Windows? Which version? Are you using the bundled Rocket server, Apache, or IIS? /dps > I wrote the code to send email in script. > > > ## 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 > > > > > > > > > On Monday, October 10, 2011 at 8:41:12 AM UTC-5, Vasile Ermicioi wrote: >> >> in db.py >> >> mail.settings.server = 'smtp.webfaction.com' >> mail.settings.sender = 'some email of yours' >> mail.settings.login = 'user:pwd' # your webfaction name and >> password, you may change the password for mailboxes from webfaction panel >> >> >> then from controllers >> >> mail.send(to=['[email protected]'], subject='Web2py email', >> message='Sent with Web2py!') >> >> just tested and works >> > -- 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.

