I'm sending some text email in appengine. When I send using the development system (googleappenginelauncher 1.9.23 on a mac, python) things look fine. Long lines are formatted/wrapped by my email client.
When I deploy, though, the text is wrapped at ~80 characters. It's broken properly at work boundaries, so it's definitely happening on purpose. It's in the raw message, so it's not my client.
I can't find any reference to turning linebreaks on/off in the api and I haven't been able to find the place in the appengine code where it's even happening.
Any ideas?
thanks!
EDIT: The issue is with text email, like so:
message = mail.EmailMessage()
message.sender = _admin_email_address
message.to = to
message.subject = subject
message.body = body
try:
message.send()
return True
except Exception as e:
logging.error("Failed to send mail {0} to {1}.\n{2}".format(subject, to, e))
return False
The 'body' is just a hunk of text with its own internal linebreaks. When sent using the dev environment, the raw email shows the text with only its internal linebreaks; when deployed, though, extra linebreaks are added to keep the width to under 80 chars or so.