The Joomla Contact Form, Gmail, and Reply-To Problems

February 05, 2013

Reading time ~2 minutes

Some of you may be sending your typical "Contact Us" form on your Joomla site to a Gmail or a Google Apps email address. If you are, and you are using Joomla 2.5 or Joomla 3, you might have noticed a problem - when you reply to the email the address that comes up is your own email, not the email of the sender.

This is somewhat inconvenient because you have to cut and paste the sender's email from within the message. As it turns out this is neither a bug in Joomla, nor a bug in Gmail. In order to reduce the possibility of the incoming email being flagged as spam, Joomla puts your email in the "From" header (because the email is
actually from your site) and it puts the sender's email and name in the "Reply To" header. The header, in part, will look something like this:

To: [email protected]
Subject: I need help please!
Date: Thu, 31 Jan 2013 23:41:47 -0600
From: The Site Name <[email protected]>
Reply-To: [email protected]

Your email and the site name are set in the Global Configuration of Joomla's administrator. The "Reply-To" address comes from the email that the sender typed into the the contact form on your site.

Now, the problem is that when the "From" email (your email) is the same as the any registered reply address for your email account (which will almost certainly include your email), Gmail ignores the 'Reply-To" address. When you click the "Reply" button in the Gmail interface you will end up sending the email to yourself ([email protected]) instead of the sender's email ([email protected]).</p>

This is incredibly frustrating, but there is a solution. All you have to do is change the "From" email slightly and the "Reply-To" address will be used.</p>

As it happens, Gmail allows you to append a suffix to the email name starting with a plus, for example [email protected]. All we need to do is make sure the Contact form is sending this email in the "From" header. We do this by changing a setting in Global Configuration. Follow these steps:</p>

  1. Log into the adminstrator of you site.
  2. Go into the Globla Configuration panel.
  3. Click on the "Server" tab.
  4. Under "Mail Settings", add the "plus suffix" to the email in the "From
    email" field.
  5. Save the Global Configuration.

Now, test the contact form out using any old email address. When the email is sent to you, your should find that you are able to reply to the sender's email instead of your own.</p>

For more information about about the "plus" feature in Gmail email addresses, have a read of the 2 hidden ways to get more from your Gmail address blog post. This is a really interesting feature because it allows you to have one, central email point for any number of sites, but separate them using a "plus suffix" (for example, I use "+www" for this site and "+learn" for the Learn the Art of Joomla site, but both go to the same email account). There are also numerous filtering opportunities as mentioned in the article.</p>

Read More

Advanced Test Driven Development for Node - Part 1

Part 1 of my attempt to port Robert C. Martin's talk '8LU:Advanced Concepts in TDD' to Node. Continue reading

Semantic versioning for retail software

Published on December 11, 2014

Better Grunt files (for organised developers)

Published on December 02, 2014