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
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.
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
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
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