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

#218 in Email

Download history 72/week @ 2024-07-28 9/week @ 2024-08-11 2/week @ 2024-09-01 11/week @ 2024-09-22 17/week @ 2024-09-29 20/week @ 2024-10-06 14/week @ 2024-10-13 20/week @ 2024-10-27

54 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–17MB
~220K SLoC