[Twisted-Python] Email problem
Tim Allen
tim at commsecure.com.au
Tue Jul 13 03:44:48 MDT 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.
[1]
<http://twistedmatrix.com/documents/10.1.0/api/twisted.mail.smtp.ESMTPSenderFactory.html#__init__>
More information about the Twisted-Python
mailing list