B
content = %{
subject: "test",
message: <p>test</p>
}
Size: a a a
B
content = %{
subject: "test",
message: <p>test</p>
}
AB
B
B
AB
B
B
AB
B
B
Email = {<<"text">>, <<"html">>, [
{<<"From">>, <<"me@example.com">>},
{<<"To">>, <<"you@example.com">>},
{<<"Subject">>, <<"This is a test">>}],
#{content_type_params => [
{<<"charset">>, <<"US-ASCII">>}],
disposition => <<"inline">>
},
<<"This is a <strong>HTML</strong> message with some non-ascii characters øÿ\r\nso there">>},
Encoded = mimemail:encode(Email)
AB
B
AB
AB
AB
B
AB
B
B
B
:gen_smtp_client.deliver(
socket,
{from, [to],
"
Subject: #{content.subject}\r\n
From: <#{from}>\r\n
To: <#{to}>\r\n
MIME-Version: 1.0\r\n
Content-Type: text/html; charset=\"utf-8\"\r\n
Content-Transfer-Encoding: quoted-printable\r\n
Content-Disposition: inline\r\n\r\n
#{content.message}"}
)