BambooSes.Encoding (bamboo_ses v0.3.0) View Source

Encoding module contains various helper methods related to encoding of a strings and an email addresses

Link to this section Summary

Functions

Checks if string contains only ASCII characters

Encodes string to rfc1342 if needed

Encodes an email address.

Link to this section Functions

Specs

ascii?(String.t()) :: boolean()

Checks if string contains only ASCII characters

Returns boolean value

Link to this function

maybe_rfc1342_encode(string)

View Source

Specs

maybe_rfc1342_encode(String.t()) :: String.t()

Encodes string to rfc1342 if needed

Returns encoded string

Specs

prepare_address(Bamboo.Email.address()) :: String.t()

Encodes an email address.

Returns encoded email address.

Example

prepare_address({"", "john.doe@example.com"})
prepare_address({"John Doe", "john.doe@example.com"})