#api-bindings #email #mailgun #json-api #reqwest #api

mailgun_v3

reqwest based web bindings for Mailgun's v3 JSON API

13 breaking releases

0.14.0 Jan 4, 2023
0.13.0 May 14, 2022
0.12.0 Mar 24, 2022
0.11.2 Aug 11, 2021
0.4.0 Aug 25, 2018

#11 in #json-api

Download history 27/week @ 2024-04-21 33/week @ 2024-04-28 16/week @ 2024-05-05 3/week @ 2024-05-12 26/week @ 2024-05-19 32/week @ 2024-05-26 49/week @ 2024-06-02 63/week @ 2024-06-09 41/week @ 2024-06-16 48/week @ 2024-06-23 66/week @ 2024-06-30 15/week @ 2024-07-07 136/week @ 2024-07-14 253/week @ 2024-07-21 597/week @ 2024-07-28 385/week @ 2024-08-04

1,372 downloads per month
Used in forge_backup

MIT license

27KB
556 lines

mailgun_v3

Build Status Current Crates.io Version

reqwest based web bindings for Mailgun's v3 JSON API

https://docs.rs/mailgun_v3/latest/mailgun_v3/

currently implemented

  • email send
  • email validation

Examples

Sending an email

use mailgun_v3::email::{Message, EmailAddress, MessageBody};
use mailgun_v3::Credentials;

fn main(){
    let msg = Message {
        to: vec![EmailAddress::address("target@example.org")],
        body: MessageBody::Text("hello world".to_string()),
        subject: String::from("sample subject"),
        ..Default::default()
    };
    let sender = EmailAddress::address("sender@example.org");
    let creds = Credentials::new(
        "key-abc1234567890",
        "example.org",
    );
    let res = mailgun_v3::email::send_email(&creds, &sender, msg);
    println!("{:?}", res);
}

More examples can be found in the examples directory.

Dependencies

~5–17MB
~259K SLoC