This ruby gem allows you to quickly and more easily generate SendGrid X-SMTPAPI headers.
The default branch name for this repository has been changed to
main as of 07/27/2020.
All updates to this library is documented in our CHANGELOG.
Table of Contents
- Ruby version >= 2.4
- The SendGrid service, starting at the free level
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
gem install smtpapi
Setup Environment Variables
Update the development environment with your SENDGRID_API_KEY, for example:
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env echo "sendgrid.env" >> .gitignore source ./sendgrid.env
header = Smtpapi::Header.new header.add_to('firstname.lastname@example.org') print header.to_json
How to Contribute
We encourage contribution to our libraries, please see our CONTRIBUTING guide for details.
This library was created by Wataru Sato and is now maintained by SendGrid.
smtpapi-ruby is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-ruby are trademarks of Twilio SendGrid, Inc.
If you need help installing or using the library, please check the Twilio SendGrid Support Help Center.
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!