Technical Tuesday: Aliasing Your Site's Email Address

Submitted by Gregory Heller on February 26, 2008 - 8:39am

Recently I had a client who was irked by the way the "from" email address for messages sent by the subscriptions module appeared in users' inboxes.

The subscriptions module, like others that send email (including user registration and password reset) pull the "from" mailing address from the site settings (admin/settings/site-information). Often times you may use an address like "info@mydomain.com" or "sitehelp@mydomain.com" for this. While getting an email that simply comes from "info@mysdomain.com" might make sense for a user registration confirmation or password reset email, it does not necessarily look pretty for a subscriptions generated email, or a notifications generated email.

Well, it turns out that you can alias this email address, much in the way that you could change your "display name" on email you send through your desktop mail client, or webmail service.

Here is what you do:

  • Visit admin/settings/site-information
  • Fill in the "Email Address" field following this pattern:
    • "Alias <info@mysite.com>" where "Alias" is the desired display name. Do not include the quote marks when you enter this into the form field.

While this is a convenient little trick, I don't think it is the best solution.

Ideally, any module that sends email from Drupal would allow you to specify the from address AND alias on its settings page. This would allow an administrator to set different addresses for different modules.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by chx on February 26, 2008 - 7:20pm.

Subscriptions 2.x is currently in beta and patches are warmly welcome! :)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <p> <a> <em> <strong> <cite> <ul> <ol> <li> <dl> <dt> <dd> <img> <b> <i> <h2> <h3> <pre> <br> <font> <hr> <s> <strike> <code> <span> <blockquote> <acronym> <del> <ins> <table> <th> <tbody> <tr> <td> <div>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options