simple_email.main.path_to_attachment_components

simple_email.main.path_to_attachment_components()[source]

Helper function to get a file’s bytes and metadata for use with Email.add_attachment.

Parameters:path – Path to a file to import as a bytes object.
Returns:Tuple of args needed to create an attachment to an Email.