SendPulse SMTP — Next Steps & External Setup

Everything you need to do outside the codebase to enable SendPulse email delivery.


1. Rails Credentials

Run bin/rails credentials:edit and add:

sendpulse:
  smtp_address: "smtp-pulse.com"
  smtp_port: 587
  smtp_username: "your-sendpulse-smtp-username"
  smtp_password: "your-sendpulse-smtp-password"

2. Create a SendPulse Account

  1. Go to SendPulse and sign up
  2. Verify your email address

3. Get SMTP Credentials

  1. Go to SMTP in the left sidebar
  2. If prompted, activate SMTP service
  3. Under Settings, note:
    • SMTP server: smtp-pulse.com
    • Port: 587 (with STARTTLS)
    • Login: Your SendPulse SMTP login (usually your email)
    • Password: Your SendPulse SMTP password
  4. Copy these into your Rails credentials under sendpulse

4. Verify Sender Domain

  1. Go to SMTP → Sender domains
  2. Add your domain (e.g., yourdomain.com)
  3. Add the following DNS records to your domain:
    • SPF TXT record (SendPulse provides the exact value)
    • DKIM TXT record (SendPulse provides the exact value)
    • DMARC TXT record (optional but recommended):
      v=DMARC1; p=quarantine; rua=mailto:[email protected]
      
  4. Wait for DNS propagation and verify in SendPulse dashboard

5. Verify Sender Email

  1. Go to SMTP → Sender emails
  2. Add the email address you'll use as MAILER_SENDER
  3. Click the verification link sent to that email

Note: The SMTP configuration is only applied in production.rb. Development uses letter_opener or the default local delivery.


6. Environment Variables

Set these in production (or in config/deploy.yml for Kamal):

APP_HOST=yourdomain.com              # Used for ActionMailer URL generation
[email protected] # From address for system emails

7. DNS Records

Type Name Value Purpose
TXT @ SendPulse SPF record Email authentication
TXT _dkim... SendPulse DKIM value Email signing
TXT _dmarc v=DMARC1; p=quarantine; rua=mailto:[email protected] DMARC policy

8. Deployment Checklist

  • SendPulse account created
  • SMTP credentials obtained and added to credentials
  • Sender domain verified (SPF + DKIM DNS records)
  • Sender email verified
  • APP_HOST and MAILER_SENDER environment variables set
  • Test email sent successfully (e.g., password reset)
  • Check SendPulse dashboard for delivery logs