It was a bug (just a display type, mails are sent correctly, it is only the print to the logging that is misplaced), that is fixed in recent versions.
On Friday, August 17, 2012 11:25:44 PM UTC+2, Cliff Kachinske wrote: > > The simple controller says this: > > record = get_email_record() > approved_suppliers = get_approved_suppliers(record.products.id) > mail.settings.server = 'logging' > mail.settings.sender = 'fooba...@gmail.com <javascript:>' > mail.settings.login = False > mail.send( > to =['jrand...@example.com <javascript:>'], > subject='Requisition Number %s for %s' %( > record.requisitions.id, > record.products.name, > ), > message = build_message(record, approved_suppliers) > ) > > > > The email in the console as the "to" and "subject" fields transposed, like > this. > > WARNING:web2py:email not sent > ---------------------------------------- > From: foobar....@gmail.com > To: Requisition Number 5 for Product_0 > Subject: jrandomu...@example.com > > This is happening on 1.99.2. I'm downloading a fresh zipball of 1.99.7 > even as I type this, so I'm going to try the code on the latest stable. > > Still, this is strange. Does anybody know what's going on? > > Thanks, > Cliff Kachinske > > --