Send email from Rails over SMTP
Set Action Mailer's SMTP settings to route your Rails app's mail through Unitpost. Same job as Nodemailer — different stack.
Configure Action Mailer
In your environment config (e.g.
config/environments/production.rb), set the delivery method and SMTP settings.Rubyconfig.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: "smtp.unitpost.com", port: 587, user_name: "unitpost", password: ENV["UNITPOST_API_KEY"], authentication: :plain, enable_starttls_auto: true, }Set your sender
Use a
fromaddress on a verified domain in your mailer.Rubyclass UserMailer < ApplicationMailer default from: "you@yourdomain.com" def welcome_email mail(to: "customer@example.com", subject: "Welcome!") end endDeliver and verify
Trigger the mailer (
UserMailer.welcome_email.deliver_now) and confirm the send in your Unitpost Activity view.