Вставьте "YourName" в скобках <> в поле sender .
Я использую Erlang, Vagabond / gen_smtp иGmail.
Это часть моего конфигурационного файла:
{email_conf, [
{sender, <<"<YourName your_gmail_address@gmail.com>">>},
{options, [
{ssl, true},
{port, 465},
{relay, <<"smtp.gmail.com">>},
{username, <<"your_gmail_address@gmail.com">>},
{password, <<"...">>}
]}
]},
и функции:
send_html(Subject, Body, Sender, Receiver, Opts) ->
Mimemail =
{<<"text">>, <<"html">>,
[
{<<"From">>, Sender},
{<<"To">>, Receiver},
{<<"Subject">>, Subject},
{<<"Content-Type">>, <<"text/html; charset=utf-8">>}
],
[{<<"transfer-encoding">>, <<"base64">>}],
Body},
Mail = {Sender, [Receiver], mimemail:encode(Mimemail)},
gen_smtp_client:send_blocking(Mail, Opts).