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
54 downloads per month
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