simple_email.main.path_to_bytes

simple_email.main.path_to_bytes(path: str) → bytes[source]

Helper function to get a bytes object from the contents of a file on disk.

Parameters:path – Path to a file to import as a bytes object.
Returns:File contents loaded from path as bytes in memory.