email.message.EmailMessage.add_attachment()

add_attachment(*args, content_manager=None, **kw)

If the message is a multipart/mixed, create a new message object, pass all of the arguments to its set_content() method, and attach() it to the multipart. If the message is a non-multipart, multipart/related, or multipart/alternative, call make_mixed() and then proceed as above. If content_manager is not specified, use the content_manager specified by the current policy. If the added part has no Content-Disposition header, add one with the value attachment. This method can be used both for explicit attachments (Content-Disposition: attachment and inline attachments (Content-Disposition: inline), by passing appropriate options to the content_manager.

doc_python
2016-10-07 17:32:36
Comments
Leave a Comment

Please login to continue.