BambooSes.Message.Destination (bamboo_ses v0.4.6)

View Source

Contains functions for composing destination information

Summary

Functions

Adds single recipient or list of recipients to the "Bcc" field of the destination struct

Adds single recipient or list of recipients to the "Cc" field of the destination struct

Adds single recipient or list of recipients to the "To" field of the destination struct

Types

recipients()

@type recipients() :: [Bamboo.Email.address()]

t()

@type t() :: %BambooSes.Message.Destination{
  BccAddresses: recipients(),
  CcAddresses: recipients(),
  ToAddresses: recipients()
}

Functions

put_bcc(destination, recipients)

Adds single recipient or list of recipients to the "Bcc" field of the destination struct

Example

put_bcc(destination, [{"John Doe", "john.doe@example.com"}, {"Jane Doe", "jane.doe@example.com"}]
put_bcc(destination, {"John Doe", "john.doe@example.com"})

put_cc(destination, recipients)

@spec put_cc(t(), [Bamboo.Email.address()]) :: t()
@spec put_cc(t(), Bamboo.Email.address()) :: t()

Adds single recipient or list of recipients to the "Cc" field of the destination struct

Example

put_cc(destination, [{"John Doe", "john.doe@example.com"}, {"Jane Doe", "jane.doe@example.com"}]
put_cc(destination, {"John Doe", "john.doe@example.com"})

put_to(destination, recipients)

@spec put_to(t(), [Bamboo.Email.address()]) :: t()
@spec put_to(t(), Bamboo.Email.address()) :: t()

Adds single recipient or list of recipients to the "To" field of the destination struct

Example

put_to(destination, [{"John Doe", "john.doe@example.com"}, {"Jane Doe", "jane.doe@example.com"}]
put_to(destination, {"John Doe", "john.doe@example.com"})