Mailtrap.Email.Attachment (mailtrap v0.1.2)
Attachment struct
Link to this section Summary
Functions
Builds Attachment struct
Puts content_id to the attachment struct.
Puts disposition to the attachment struct.
Puts type to the attachment struct
Link to this section Types
Link to this section Functions
build(content, filename)
Builds Attachment struct
put_content_id(attachment, content_id)
Puts content_id to the attachment struct.
examples
Examples
iex> attachment = Mailtrap.Email.Attachment.build("content", "filename") iex> Mailtrap.Email.Attachment.put_content_id(attachment, "abcdef") %Mailtrap.Email.Attachment{
content_id: "abcdef",
filename: "filename",
content: "Y29udGVudA=="
}
put_disposition(attachment, disposition)
Puts disposition to the attachment struct.
examples
Examples
iex> attachment = Mailtrap.Email.Attachment.build("content", "filename") iex> Mailtrap.Email.Attachment.put_disposition(attachment, "inline") %Mailtrap.Email.Attachment{
disposition: "inline",
filename: "filename",
content: "Y29udGVudA=="
}
put_type(attachment, type)
Puts type to the attachment struct
examples
Examples
iex> attachment = Mailtrap.Email.Attachment.build("content", "filename") iex> Mailtrap.Email.Attachment.put_type(attachment, "text/plain") %Mailtrap.Email.Attachment{
type: "text/plain",
filename: "filename",
content: "Y29udGVudA=="
}