email modules and attachments that aren't there
Russell Bungay
bigmaddrongo at yahoo.co.uk
Tue Jan 10 05:02:01 EST 2006
Russell Bungay wrote:
> for attachment in attachments:
> <snip contents of for loop>
> sub_msg = email.Message.Message()
> sub_msg.add_header('Content-type', content_type, name=attachment)
> sub_msg.add_header('Content-transfer-encoding', cte)
> sub_msg.set_payload(contents_encoded.getvalue())
> main_msg.attach(sub_msg)
These lines should of course be within the for, not outside it. Apologies.
Russell
More information about the Python-list
mailing list