[Twisted-Python] Email problem

Tim Allen tim at commsecure.com.au
Tue Jul 13 05:44:48 EDT 2010

On 07/13/2010 07:32 PM, Alvin Wang wrote:
> # that's all falks
> writer.lastpart()
> m = message.getvalue()
> message.close()

Here, you set "m" to be a string containing the message contents.

> factory = ESMTPSenderFactory(sender,
>                             senderpw,
>                             sender,
>                             to,
>                             m,
>                             result,
>                             contextFactory=contextFactory)

The documentation for ESMTPSenderFactory[1] says that the parameter 
after "to" is:

"file	A file-like object containing the message to send."

Try passing the "message" variable instead of your "m" variable.


More information about the Twisted-Python mailing list