attach_bytes Method
Creates an attachment from a memory buffer.
Syntax
def attach_bytes(data: bytes) -> int: ...
Remarks
Use this method to create an attachment from a memory buffer. Use attachments property to provide further attachment details.
The method returns the index of the new attachment in the attachments list.