Re: email modules and attachments that aren't there

2006-01-10 Thread Russell Bungay
Russell Bungay wrote: > for attachment in attachments: > > 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_encod

Re: email modules and attachments that aren't there

2006-01-10 Thread Russell Bungay
Hello, >>> main_msg['Content-type'] = 'Multipart/mixed' >> Would it be the 'Content-Type' header? I've no expertise in this, but >> doesn't 'multipart' mean 'has attachments'? > Brilliant, thank you. A swift test on the number of attachments and > changing the header suitably does the job.

Re: email modules and attachments that aren't there

2006-01-10 Thread Russell Bungay
Hello, >> main_msg['Content-type'] = 'Multipart/mixed' > Would it be the 'Content-Type' header? I've no expertise in this, but > doesn't 'multipart' mean 'has attachments'? Brilliant, thank you. A swift test on the number of attachments and changing the header suitably does the job. Thank

Re: email modules and attachments that aren't there

2006-01-09 Thread Gerard Flanagan
Russell Bungay wrote: > Hello all, > > I have written a short function, based on a recipe in the Python > Cookbook, that sends an e-mail. The function takes arguments that > define who the e-mail is to, from, the subject, the body and an optional > list of attachments. > > The function works also

email modules and attachments that aren't there

2006-01-09 Thread Russell Bungay
Hello all, I have written a short function, based on a recipe in the Python Cookbook, that sends an e-mail. The function takes arguments that define who the e-mail is to, from, the subject, the body and an optional list of attachments. The function works also perfectly, bar one slight problem