Technical Tuesday: Aliasing Your Site’s Email Address

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.