Wraith.Newsletter (Wraith v0.1.0)

View Source

Everything that goes out by mail, built with Swoosh and sent through Wraith.Mailer:

Mail is plain HTML built here (no template engine): the post body is the rendered Markdown with widgets replaced by a link to the live page.

Summary

Functions

Double opt-in: the link that turns a sign-up into a subscriber.

Mail a published post to every subscribed member who may read it (paid posts go to paid members only). Returns {:ok, count}; {:error, :already_sent} the second time unless force: true.

Someone replied to a member's comment.

Mail a post (any status) to one author as a test; nothing is recorded.

Has this post gone out as a newsletter?

Functions

confirm_url(map)

deliver(email)

login_url(map)

mail(to_email, to_name, subject, html)

send_confirmation(member)

Double opt-in: the link that turns a sign-up into a subscriber.

send_login_link(member)

send_password_reset(user)

send_post(post, opts \\ [])

Mail a published post to every subscribed member who may read it (paid posts go to paid members only). Returns {:ok, count}; {:error, :already_sent} the second time unless force: true.

send_record(map)

send_reply_notice(member, post, reply)

Someone replied to a member's comment.

send_test(post, map)

Mail a post (any status) to one author as a test; nothing is recorded.

send_welcome(member)

sent?(map)

Has this post gone out as a newsletter?

unsubscribe_url(map)