Contact Form 7 email
Styling your emails sent from the customer and to the customer is a great marketing tool. Having a well formatted email is essential, as this will most likely be the first communication with the customer. It also always easy extraction of information for preparing documents, quotes and so on.
Note: Some of the code (HTML, CSS or PHP) within this blog are from other blog posts, forums and may have been modified from other web sources. Always verify the code prior to using it on a live website.
Two choices for the type of email format:
- Plain text – Good for simple no no-sense emails with very basic formatting
- HTML – Great to create an impressive email with formatting to suit your requirements
Data from Contact form 7 fields
Easily add in a form entered details such as the users name, email, message or whatever your form has. These can be used in the email itself including in the following:
- To email address
- From email address
- Additional headers
- Message body
An example of how to use this would be for the subject: Fat Dog SEO – [customer-name] from [customer-company] requires [fat-dog-seo-service]. Where the blue is a short-code form field and the purple is plain text. A header example may include Reply-To: [customer-email] or similar.
Find out more about our services
HTML email for Contact Form 7
Ensure that the tick box below the Contact form 7 “message body” is ticked, otherwise, the email won’t appear nice at all!
So we are aiming for an email that looks like the one below. The dotted lines don’t visually appear in the email but do allow copying and pasting of data into a table. This helps significantly if you have a large form and want to transpose the details, without manually doing it. Obviously the fields etc are whatever you want them to be. Also, the image is from open-source (Wikipedia) but can be changed to your company logo or similar.
Here is the Contact Form 7 HTML email template
Below is the HTML for the example email template, this should help create your first template. The same principle applies if you want to send a “Mail 2” email such as an auto-response the user to let them know their message was received or an auto-reply.