title: Rails 3 Overriding Devise Mailer
body: <p>I am working on an app that is tightly being integrated in with Mandrill (MailChimp's transactional email service) and I am trying to override the Devise Mailer but for some reason when I send off the API call to Mandrill I receive their email, but Devise also sends me an email (which is blank).</p>
  
  <p>Here is my <code>DeviseMailer</code></p>
  
  <pre><code>class MyDeviseMailer &lt; Devise::Mailer
    def reset_password_instructions(record)
      mandrill = Mandrill::API.new("#{MandrillConfig.api_key}")
      mandrill.messages 'send-template',
              { 
                :template_name =&gt; 'Forgot Password', 
                :template_content =&gt; "",
                :message =&gt; {
                  :subject =&gt; "Forgot Password",
                  :from_email =&gt; "test@test123.com",
                  :from_name =&gt; "Company Support",
                  :to =&gt; [
                    {
                      :email =&gt; record.email
                    }
                  ],
                  :global_merge_vars =&gt; [
                    {
                      :name =&gt; "FIRST_NAME",
                      :content =&gt; record.first_name
                    },
                    {
                      :name =&gt; "FORGOT_PASSWORD_URL",
                      :content =&gt; "&lt;a href='#{edit_user_password_url(:reset_password_token =&gt; record.reset_password_token)}'&gt;Change My Password&lt;/a&gt;"
                    }
                  ]
                }
              }
        #We need to call super because Devise doesn't think we have sent any mail 
        super
    end
  end
  </code></pre>
  
  <p>The call to <code>super</code> I found here: <a href="http://qnundrum.com/answer.php?q=254917" rel="noreferrer">http://qnundrum.com/answer.php?q=254917</a></p>