web2py/web2py — pull request #179 by nursix (2013-08-22 21:03:26+00:00)
Title: Ability to send emails with empty message body.

Attempts to send emails with empty message body (message="") lead to an UnboundLocalError:

File "/home/rms/prod/gluon/tools.py", line 450, in send
payload_in = attachment
UnboundLocalError: local variable 'attachment' referenced before assignment

This fixes it.