Are you sure you have configured Mail properly? See http://web2py.com/book/default/chapter/08#Auth-and-Mail. Are you able to send an email from a controller?
On Friday, May 27, 2011 9:05:00 AM UTC-4, encompass wrote: > I am running this: > ---- > python web2py.py -S welcome -M -N -R > applications/welcome/private/email_sender.py > ---- > I am trying to send email with this... > ---- > import time > while True: > print "Checking for new mails..." > rows = db(db.invitations.sent_email == False).select() > for invite in rows: > if mail.send(to=invite.email, > subject=invite.subject, > message=invite.message): > row.update_record(sent_email = True) > print "Sent the email!" > else: > row.update_record(sent_email = False) > db.commit() > time.sleep(10) # check every minute > --- > But it seems that I don't mail object imported... but I do... > mail = Mail() # mailer > in my 0db.py file <--- it does have a 0 yes. :) > > What am I missing? I am trying to do this... > > http://web2py.com/book/default/chapter/04#Background-Processes-and-Task-Queues > --- > Best Regards, > Jason Brower >

