SMTP
Send Rails email with SMTP
Configure Action Mailer to deliver through Parcel Wing SMTP.
SMTP settings
Copy the exact values from your in-app Settings page. Most accounts use these defaults.
SettingValue
Host
smtp.parcelwing.comPort
587Security
STARTTLSUsername
parcelwingPassword
Any active Parcel Wing API keyAction Mailer
Store your API key in credentials or environment variables, then configure SMTP in production.
config/environments/production.rb
# config/environments/production.rbconfig.action_mailer.delivery_method = :smtpconfig.action_mailer.smtp_settings = {address: "smtp.parcelwing.com",port: 587,user_name: "parcelwing",password: ENV.fetch("PARCELWING_API_KEY"),authentication: :plain,enable_starttls_auto: true,}config.action_mailer.default_options = {from: "Acme <[email protected]>",}
Use a verified sender
Your from address should belong to a sending domain that is verified in Parcel Wing. This keeps SPF, DKIM, and DMARC aligned for better deliverability.
Troubleshooting
- Use port
587with STARTTLS, not implicit TLS on port 465. - Use
parcelwingas the username and an active Parcel Wing API key as the password. - Make sure the sender address uses a verified sending domain.
- If a vendor has a test email button, send a test before enabling production email.