Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (29 sloc) 1.198 kb
<erl>
out(A) ->
case mail:check_session(A) of
{ok, Session} ->
L = yaws_api:parse_post(A),
Cmd = mail:get_val("cmd", L, reply),
case Cmd of
"reply" ->
From = yaws_api:url_decode(mail:get_val("from", L, "")),
Subject = yaws_api:url_decode(mail:get_val("subject", L, "")),
To = yaws_api:url_decode(mail:get_val("to", L, "")),
Cc = yaws_api:url_decode(mail:get_val("cc", L, "")),
Bcc = yaws_api:url_decode(mail:get_val("bcc", L, "")),
Quote = yaws_api:url_decode(mail:get_val("quote", L, "")),
NewCc =
if To == [] -> Cc;
Cc == [] -> To;
true -> To ++ ", " ++ Cc
end,
mail:compose(Session,"",From,NewCc,Bcc,"RE: "++Subject,
Quote);
"delete" ->
Nr = mail:get_val("nr", L, ""),
mail:delete(Session, [Nr])
end;
Error ->
Error
end.
</erl>
Jump to Line
Something went wrong with that request. Please try again.