9.2. Custom X-Header

If you feel the urge to integrate an additional X-header then this is no problem. Here is an example for expanding the file app/mailers/notification.rb:
class Notification < ActionMailer::Base
  default from: "from@example.com"

  def new_account(user)
    @user = user
    headers["X-Priority"] = '3'
    mail(to: user.email,
         subject: "The new account #{user.name} is active.")
This means the sent e-mail would look like this:
Sent mail to stefan.wintermeyer@amooma.de (50ms)
Date: Wed, 30 May 2012 17:35:21 +0200
From: from@example.com
To: stefan.wintermeyer@amooma.de
Message-ID: <4fc63e39e356a_aa083fe366028cd8803c7@MacBook.local.mail>
Subject: The new account Wintermeyer is active.
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
X-Priority: 3

Hello Wintermeyer,

your new account is active.

Have a great day!
  A Robot

Thank you for your support and the visibility by linking to this website on Twitter and Facebook. That helps a lot!