Ruby on Rails
Last updated
Was this helpful?
Last updated
Was this helpful?
Enveloop provides the wrapper for our Enveloop API. It simplifies configuring and sending messages (email & SMS/text) via Enveloop inside your Ruby on Rails apps.
Provided are some quick docs for setting up Enveloop inside your Ruby on Rails app and interacting with the Enveloop Ruby gem.
There are a couple of ways to get started. Using , you can install it locally with the following command:
Additionally, you can add the following to your application's Gemfile:
After doing so, you can run the following terminal command:
The Enveloop Gem includes helpful methods to interact with the Enveloop API, including:
send_message
template_info
We'll talk about how to use some of these methods in the notes to follow.
Add/update the following lines in your respective Rails environments file.
From your command line, use a Rails generator to create a new Enveloop Mailer.
Now that the mailer is created, you can modify it and add in a custom method, based on your application, to call the send_message
method in the Enveloop API.
Now, all that is left is to make a call to send a message, via Enveloop, whenever you need it.
This documentation assumes that you have a mostly standard Rails app up and running. Obviously, there are variations to the mailer types you can use -- and we cover some of this, including , on the Enveloop Blog.
You can find additional information for other methods, sending text/SMS messages, and more by viewing the .
Bug reports and pull requests are welcome on GitHub at . Additional information, including license, development procedures, and Code of Conduct are available in the source repository documentation.