Re: [web2py] Webfaction and SMTP
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=['y...@whatever.com'], 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Webfaction and SMTP
Hi Iam uing the same settings as yours in db.py. But I got the following error. Error 10060: A connection attempt failed. 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=['y...@whatever.com javascript:'], 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Webfaction and SMTP
Hi web2py users, does anybody use Webfaction as hosting and use Webfactions SMTP servers to send mail? What settings are you using? I can´t web2py to send mails from Webfaction. Kenneth
Re: [web2py] Webfaction and SMTP
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=['y...@whatever.com'], subject='Web2py email', message='Sent with Web2py!') just tested and works
Re: [web2py] Webfaction and SMTP
Many thanks Vasile, I´m 100% sure I tested the same setting many times before, but no luck. Now I copied your settings and voila it works. It´s sometimes so frustrating to search for errors and after hours of searching it just works without finding what was wrong. But I guess thats the life of a programmer. Kenneth in db.py mail.settings.server = 'smtp.webfaction.com http://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=['y...@whatever.com mailto:y...@whatever.com'], subject='Web2py email', message='Sent with Web2py!') just tested and works