View Source Paubox.Attachment (paubox v1.0.0)
Summary
Types
A Paubox email attachment. Additional info can be found at https://docs.paubox.com/docs/paubox_email_api/messages
Functions
This will create a new Paubox.Attachment struct from a file. It will read the file in, encode it to base64, and set the content type based on the file extension. If no content type is found, it will default to text/plain.
This will write the attachment to the specified directory. If no directory is specified, it will default to the current directory.
Types
@type t() :: %Paubox.Attachment{ content: String.t(), content_type: String.t(), file_name: String.t() }
A Paubox email attachment. Additional info can be found at https://docs.paubox.com/docs/paubox_email_api/messages
Functions
This will create a new Paubox.Attachment struct from a file. It will read the file in, encode it to base64, and set the content type based on the file extension. If no content type is found, it will default to text/plain.
This will write the attachment to the specified directory. If no directory is specified, it will default to the current directory.