Skip to content
victorbstan edited this page Feb 10, 2013 · 1 revision

Gotchas

If your cron reports errors like this:

A sender (Return-Path, Sender or From) required to send a message (ArgumentError)

You might have to specify return_path and sender in your mailer, even if you have your production environment configuration to send through an account like GMail.

default from: "Your Name <[email protected]>",
        return_path: '[email protected]',
        sender: '[email protected]'

In the context of a mailer:

class YourMailer < ActionMailer::Base
  helper :application
  default from: "Your Name <[email protected]>",
          return_path: '[email protected]',
          sender: '[email protected]'

  def your_mailer_email
    # your mailer logic
  end
end