How to Properly Set the From Field with Contact Form 7

Per their recommended practices, it’s a good idea to NOT use the email address provided by the person filling the form as the “From” field, since some hosts/email providers will block those messages as suspicious, phishing or spam.  You should use an email address from your domain, like “yourcustomfrom@drzaus.com“.

However, the caveat is that for some hosting/email providers, if the address you’re using doesn’t exist then it will substitute that fake email from the message with the site default (like yoursiteid@hostXYZ.yourhostprovider.com).  So the solution is obviously to make sure there’s an email account ready before you use it!

You can still customize the name shown on the sender:

[your-name-field] <yourcustomfrom@drzaus.com>

And, of course, since you’ll want to easily reply to these emails, put the sender email as the “Reply-To” header in the “Additional headers” field of the mail configuration section:

Reply-To: [your-name-field] <[your-email-field]>

Leave a Reply

Your email address will not be published. Required fields are marked *