Ruby on Rails integration

ZeptoMail for Ruby on Rails facilitates email sending from Rails applications using ZeptoMail APIs, making it straightforward to handle everything from user verification emails and password resets to system notifications, all with reliable, high-deliverability transactional email infrastructure.

Applications built using Ruby can be configured to send user-triggered transactional emails. This can be done by connecting their application with ZeptoMail. For applications built using Ruby on Rails, it is necessary to configure ZeptoMail for both Ruby and Rails separately. The integration supports both plain text and HTML emails, along with attachments.

Installing ZeptoMail Ruby package

As a first step, you should install the ZeptoMail package. To install the package:

  1. Navigate to Ruby's package platform.
  2. Copy the gem file available and paste it in the command prompt/terminal of your device.

Email-sending using ZeptoMail

Once you install the ZeptoMail package, you should configure it to start sending emails. This includes adding the Send Mail token that will be used for email-sending. You should generate the token from your ZeptoMail account. Follow the steps to generate it.

Generating Send Mail token

  1. Login to your ZeptoMail account.
  2. Select the Agent that you want to connect to your application.
  3. Navigate to the SMTP/API tab. This will open the Setup Details page.
  4. From here you can copy the Agent specific Send Mail token under the API tab.
  5. You can either use the default Send Mail token or generate a new one.


Agent >> SMTP/API >> Send Mail token >> Click to copy icon.

Ruby on Rails' built-in email framework (Action Mailer) can be leveraged for sending transactional emails using both SMTP and email APIs.

 

Refer to this help page for the complete API reference with all integration code samples including plain text emails, HTML emails, attachments, and multi-recipient support for Ruby on Rails integration.

PREVIOUS

UP NEXT