Rails
Connect Action Mailer to Sendy for your Rails application.
Before you begin, verify a sending domain and create an API key. Keep the key in your application server’s secret configuration.
Configure Rails
Add these settings inside the existing Rails.application.configure block. Use the matching environment file for development, and restart the application after changing it.
Use this configuration:
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
address: "smtp.usesendy.com",
port: 2525,
user_name: "apikey",
password: "API_KEY",
authentication: :plain,
enable_starttls_auto: true
} Replace API_KEY with your full Sendy API key and the sender with an address on your verified domain. Use STARTTLS on port 2525 with the literal username apikey. See Rails email documentation.
Send a test email
Open your application’s shell:
bin/rails console -e productionReplace the recipient with your test address, then run:
ActionMailer::Base.mail(
from: "My App <[email protected]>",
to: "[email protected]",
subject: "Welcome",
content_type: "text/html",
body: "<h1>Welcome</h1><p>Your account is ready.</p>"
).deliver_nowUse the same transport with your application’s mailers. Set their default from address to your verified sender.
Check the result
Open Emails to confirm the message was queued and follow its status. Successful SMTP submission confirms queuing, not inbox delivery. See Errors for failure guidance.