6 releases (3 breaking)

0.4.0 Aug 19, 2022
0.3.1 Nov 4, 2021
0.2.1 Sep 28, 2021
0.2.0 Apr 29, 2021
0.1.1 Feb 25, 2021

#222 in Email

Download history 2/week @ 2024-01-20 26/week @ 2024-01-27 10/week @ 2024-02-03 13/week @ 2024-02-10 3/week @ 2024-02-17 6/week @ 2024-02-24 12/week @ 2024-03-02 3/week @ 2024-03-09 2/week @ 2024-03-16 26/week @ 2024-03-30 5/week @ 2024-04-06 25/week @ 2024-04-13 29/week @ 2024-04-20 7/week @ 2024-04-27 6/week @ 2024-05-04

67 downloads per month

MIT license

13KB
274 lines

Mailgun46

An email client using Mailgun.

The domain to use for mail can be configured using env variables.

  • MAILGUN46_DOMAIN: The domain to send with.
  • MAILGUN46_TOKEN: The token to use, taken directly from the one retreived from Mailgun.

lib.rs:


use mailgun46::{Mailer, EmailBuilder};
// Setup a new client from env.
// The <from> header will be noreply@domain.
let client = Mailer::from_env()?;
EmailBuilder::default()
  .to("somethingparseableasanemail")
  .subject("An email")
  .text_body("A plain, informative text body")
  .build()?
  .send(&client).await?;

Dependencies

~4–19MB
~259K SLoC