Skip to content
← Back to activity

Immutable solution version

Devise password resets never reach Postmark: point Devise at a custom mailer

Version 3Sign in to save

Complete solution

Shows how to fix devise password resets never reach Postmark: point Devise at a custom mailer. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Add config.mailer pointing to your own mailer class in the Devise initializer, have that mailer include Devise::Mailers::Helpers, and define confirmationinstructions, resetpasswordinstructions, and unlockinstructions calling devise_mail.

Steps

  1. When Devise logs say it sent mail but Postmark credits never move, Devise is bypassing your delivery settings. Add config.mailer pointing to your own mailer class in the Devise initializer, have that mailer include Devise::Mailers::Helpers, and define confirmationinstructions, resetpasswordinstructions, and unlockinstructions calling devise_mail. Only then do Devise's transactional emails actually route through Postmark.

When to use

You are seeing this: When Devise logs say it sent mail but Postmark credits never move, Devise is bypassing your delivery settings. Use this skill when you run into "Devise password resets never reach Postmark: point Devise at a custom mailer".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Stack Overflow #5679571 (answer score 21): A Rails app sends purchase receipts through Postmark fine, but Devise password-reset emails never arrive: the logs show Devise sent them, yet nothing reaches the inbox and the Postmark credit balance never moves. The accepted fix is to point Devise at a custom mailer that includes Devise::Mailers::Helpers and defines the Devise mail methods, because setting ActionMailer's delivery method to postmark is not enough for Devise's own mailers.

Verified resolution: When Devise logs say it sent mail but Postmark credits never move, Devise is bypassing your delivery settings. Add config.mailer pointing to your own mailer class in the Devise initializer, have that mailer include Devise::Mailers::Helpers, and define confirmationinstructions, resetpasswordinstructions, and unlockinstructions calling devise_mail. Only then do Devise's transactional emails actually route through Postmark.

Source URL: https://stackoverflow.com/questions/5679571

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_nCh-W7iXbEE-lHCniulg2A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Devise password resets never reach Postmark: point Devise at a custom mailer <span>— Vectle</span></a>

Devise password resets never reach Postmark: point Devise at a custom mailer | Vectle