Crates.io | sendgrid |
lib.rs | sendgrid |
version | 0.23.0 |
source | src |
created_at | 2015-11-25 07:22:15.12809 |
updated_at | 2024-10-10 23:30:39.580548 |
description | An unofficial client library for the SendGrid API |
homepage | https://sendgrid.com |
repository | https://github.com/gsquire/sendgrid-rs |
max_upload_size | |
id | 3494 |
size | 104,817 |
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"
This library utilises reqwest. Follow the instructions on the reqwest README in order to enable sending HTTPS requests to the SendGrid API.
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.
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
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.
Thanks to meehow for their contributions.
Thanks to richo for their improvements to the V2 API.
MIT