54 releases (22 breaking)

0.23.0 Oct 10, 2024
0.22.0 Aug 30, 2024
0.21.0 Mar 21, 2024
0.19.2 Jul 20, 2023
0.1.1 Nov 29, 2015

#8 in Email

Download history 11655/week @ 2024-07-29 12312/week @ 2024-08-05 15782/week @ 2024-08-12 10528/week @ 2024-08-19 12273/week @ 2024-08-26 14031/week @ 2024-09-02 12336/week @ 2024-09-09 10349/week @ 2024-09-16 13786/week @ 2024-09-23 15704/week @ 2024-09-30 13975/week @ 2024-10-07 15573/week @ 2024-10-14 14372/week @ 2024-10-21 14928/week @ 2024-10-28 15818/week @ 2024-11-04 12112/week @ 2024-11-11

57,518 downloads per month
Used in 8 crates (5 directly)

MIT license

62KB
1K SLoC

sendgrid-rs

Unofficial Rust library for the SendGrid API.

This crate requires Rust 1.15 or higher as it uses a crate that has a custom derive implementation.

sendgrid-rs implements all of the functionality of other supported SendGrid client libraries. To use sendgrid-rs you must first create a SendGrid account and generate an API key. To create an API key for your SendGrid account, use the account management interface or see the SendGrid API Documentation.

sendgrid-rs is available on crates.io and can be included in your Cargo.toml as follows:

[dependencies]
sendgrid = "X.X.X"

Build Dependencies

This library utilises reqwest. Follow the instructions on the reqwest README in order to enable sending HTTPS requests to the SendGrid API.

Features

You can take advantage of a couple features for the crate. To enable the blocking send function, you can use the blocking flag. To enable the rustls TLS feature, use the rustls flag.

Example

An example of using this library can be found in the examples directory. This example code expects to find your SendGrid API key in the process environment. In shells such as Bash or ZSH this can be set as follows:

export SENDGRID_API_KEY="SG.my.api.key"
SENDGRID_API_KEY=SG.... cargo run --example v3_disable_tracking --features="blocking" from@examle.com to@example.com

Documentation

Documentation

Please don't hesitate to contact me at the email listed in my profile. I will try to help as quickly as I can. If you would like to contribute, contact me as well.

Mentions

Thanks to meehow for their contributions.

Thanks to richo for their improvements to the V2 API.

License

MIT

Dependencies

~4–17MB
~250K SLoC