Imison.Notifications.Channels.Email (Imison v0.1.0)

Copy Markdown View Source

Emails notifications through the host's Swoosh mailer.

Needs the mailer (the host's Swoosh.Mailer module) and from options; the recipients are the channel's stored settings (%{"recipients" => ["ops@example.com"]}). The email is plain text, headed "New error" for a new error, "Came back" (with when it came back) for a resolved error that happened again and "Still happening" (with when it was last seen) for the hourly reminder about an unresolved error that keeps happening, then the error's kind, message, location, occurrence count, when it was first seen and, with the dashboard_url option, a link to its detail page. The daily digest is "[Imison] Daily summary for <date>" with three sections, "New errors", "Came back" and "Most frequent", each line giving an error's kind, message, that day's occurrence count, location and, with dashboard_url, its link; a section with more errors than it lists ends with "and N more" and the dashboard's link. The test message sent from the notifications screen is "[Imison] Test email", saying that delivery works.

Each recipient must look like an email address (local@domain); the domain isn't looked up. On the Notifications screen its panel is "Email", with a "Send to" field for the recipients and, under the title, the mailer and sender it sends with.

Compiled only when the host depends on Swoosh.