Contact Form 7 configuration

Contact Form 7 configurationSince WordPress doesn’t have a default contact form, we’ll show you how to implement the popular Contact Form 7 plugin. We’ll also discuss SMTP server configuration and typical ‘reply to’ problems. Finally, both Captcha and Akismet will be used to protect Contact Form 7 against spam.







1. Why do we need a plugin to implement something basic as a contact form?

WordPress is born as a pure blogging software and is known all over the planet to be fast, stable and easy to use. This is possible because the core of WordPress has been kept very clean by its main developers. As a consequence, WordPress comes without a default contact form. Fortunately, we can extend the core WordPress functionality by implementing the Contact Form 7 plugin.


Good preparation is half the battle…

Before kicking of this tutorial, make sure you have some working (Gmail) email addresses. The fictitious email addresses we’ll use are the following:

  • : All messages will be send through this email address. Its only purpose is to deliver the emails from our contactform, to our inbox.
  • : For instance your personal email address. We’ll use this to check our configuration.
  • : This is the email address where we want our contact form messages to be delivered. Probably, this’ll be your company email address.


Basic steps


2. Install WP Mail SMTP to send all emails through an external SMTP server

If you want your website to use an email account from Gmail, Zoho Mail, Outlook or some other online email service, you can employ their SMTP server for sending all outgoing emails. There’s no need to install email server software like Sendmail or Postfix on your own server. This tutorial is based on Gmail. The other email providers might need some other configuration to work…

  • In your WordPress backend navigate to Plugins > Add New
  • Search Plugins : wp mail smtp
  • Press [Enter] to start searching
  • WP Mail SMTP will show up in the top of the list (version 0.9.5 at the time of our last edit)
  • Click Install Now
  • Click OK
  • Click Activate Plugin


3. Configuration of WP Mail SMTP

Now that we’ve installed WP Mail SMTP we can start the configuration of this plugin. We’ll start with the Advanced Email Options.

  • In the plugins list beneath WP-Mail-SMTP click Settings
  • From Email : leave this empty
  • From Name : Cool Tricks
  • Mailer : Send all WordPress emails via SMTP
  • Return Path : unchecked



Blank ‘From Email’ field

It seems that the From Email field has no impact at all if you use an SMTP server to send all WordPress emails. The only place where it’ll be used is in the next step, when testing the SMTP configuration. However, Contact Form 7 doesn’t seem to use the email address of this field. As a result, we choose this field to be empty to make it more clear that it has no impact on our Contact Form 7 configuration.


Then which email address will be used as the “From email address”?

When using the Google SMTP servers, Google will automatically show the email address that’s being used for the SMTP connection. We’ll configure this email address in the following lines.


We’ll now have a look at the SMTP configuration. By doing this, WordPress will know how to connect to our Gmail account. As explained already, this email address will later show up as the “from email address”.

  • SMTP Host :
  • SMTP Port : 465
  • Encryption : Use SSL encryption
  • Authentication : Yes: Use SMTP authentication
  • Username :
  • Password : Enter your password
  • Click Save Changes



Some popular SMTP server settings

These are the SMTP server settings for some popular email providers. Be aware though, that this tutorial is only tested with Gmail email addresses… The other email providers might need extra configuration in order to fully work with Contact Form 7!


SMTP Host :
Type of Encryption : SSL
SMTP Port : 465


SMTP Host :
Type of Encryption : SSL
SMTP Port : 465


SMTP Host :
Type of Encryption : SSL
SMTP Port : 465


SMTP Host :
Type of Encryption : TLS
SMTP Port : 587


4. Sending a test email with WP Mail SMTP

Within the same screen you can control your WP Mail SMTP settings by sending a test email. To avoid any confusion use a different email account than the one you used before.

  • To :
  • Click Send Test
  • Log in to your account to verify whether you actually received the test email
  • Tip : When you log in to (see step3) you’ll find the test email in your sent messages folder!



5. Debug and track down any errors with the test email

It can be frustrating if you can’t successfully send a test email. However, if you don’t succeed it’s pointless to continue this tutorial. First track down the cause of the error and use the debugging output to fix the problem. After sending the test email, the first lines of the report indicate whether or not the test succeeded. If all goes well, you should see the following lines.

Test Message Sent

The result was:


However, in this step we’ll investigate some common issues and their solution in case you encounter a false value. You can use both the full debugging output (above) as well as the SMTP debugging output (below ) to track down any errors with the test email. Both reports will give you detailed information indicating the cause of the error.


Incorrect authentication because of wrong login credentials

Since we’re using an external SMTP server the most common mistake can be narrowed down to the use of incorrect login credentials. This will automatically result in an incorrect authentication with the external SMTP server. When you’re using a wrong password, both debugging outputs will throw up errors like these:

string(35) “SMTP Error: Could not authenticate.”

string(35) “SMTP Error: Could not authenticate.”

SMTP -> ERROR: Password not accepted from server: […] Authentication Failed

SMTP -> ERROR: Password not accepted from server: […] Username and Password not accepted.

SMTP server error: […] Authentication Required.

The following From address failed:


SMTP Error: Could not connect to SMTP host

Check whether your hosting company is not blocking the port that is used to connect with you external SMTP Server. Especially on a shared hosting environment, it’s possible that an essential port is blocked on the entire server. As a result, you won’t even be able to connect with your external SMTP server.


6. Install Contact Form 7

Only(!) if you managed to successfully send a test email through the WP Mail SMTP plugin, you can continue this tutorial by installing the Contact Form 7 plugin.

  • In your WordPress backend navigate to Plugins > Add New
  • Search Plugins : contact form 7
  • Press [Enter] to start searching
  • Contact Form 7 will show up in the top of the list (version 4.0.1 at the time of our last edit)
  • Click Install Now
  • Click OK
  • Click Activate Plugin


7. Basic configuration of Contact Form 7

Now that we’ve installed Contact Form 7 we can start the configuration of this plugin. We start from the default contact form and implement an extra field to capture a website address. We’ll use a separate email address to receive all emails. You can read more on this in the box below.

  • In the plugins list beneath Contact Form 7 click Settings
  • Click Contact form 1
  • Click Generate Tag and select URL
  • Name : your-url
  • Default value : website address
  • Use this text as placeholder : check the box



The Contact Form 7 plugin has automatically generated two shortcodes, as you can seen in the screenshot above. Copy the first shortcode and paste it on top of the textarea ‘Form‘. We added some extra html to make sure our new field lines up correctly with the other fields.



We can now continue with the configuration of the Mail section.

  • Copy the second shortcode and paste it on top of the textarea ‘Message body
  • To :
  • From : [your-name] <> (see step 3)
  • Additional headers : Reply-To: [your-email]
  • Click Save



Almost all problems with Contact Form 7 can be narrowed down to a misconfiguration of the ‘Mail’ section. We’ll briefly discuss the culprits.

(1) In the ‘To’ field, don’t use the email address that’s used for sending the emails

  • Especially when using Contact Form 7 with an external SMTP server – as we’re doing in this tutorial – you should use another email addresses for your ‘To’ field than the one that’s used for sending the emails. You’ll get into trouble if you don’t follow this advice! That’s also the reason why we told you in the beginning to have several working email addresses. What exactly is the problem if you do use the same email address? In that case, Gmail will automatically set this as the ‘reply to‘ email address, no matter what you do… Instead of replying to your visitor, you’ll reply to your own email address that’s used for sending the email address. To overcome this issue, make sure to use a different email address.


(2) Do not use the email address of your visitor in the ‘From’ field

  • The default value for the ‘From’ field [your-name] <[your-email]> has been the culprit for many people. By using this default shortcode, Contact Form 7 will automatically populate this field with the email address of your website visitor. At first glance, this seems ok… However, remember that we’re using the SMTP server from online email services like Gmail, Zoho Mail, Outlook or something else to deliver our outgoing emails. Those email providers want us to authenticate in the correct way, when using their SMTP servers. If they receive a request from our website to use their SMTP server for sending an email, they want to be sure that this request is legitimate. To be more precise, they expect the user with the email account that we configured in step 3. They do not allow the email address from our website visitor however. As a result, if you don’t correctly edit the ‘From’ field, you’ll almost always receive the following error when trying to send an email through contact form 7:

    Failed to send your message. Please try later or contact the administrator by another method.


(3) Use an additional header to capture the email address of your visitor

  • As we were not able to capture the email address from our visitor in the ‘From’ field, we’ll have to face another problem. Whenever you want to reply to an email from your visitor, you’ll be writing an email to yourself. That’s a normal behaviour as we were forced to use our own email address in the ‘From’ field. Luckily, we can overcome this problem by populating the ‘Reply-To’ field with Reply-To: [your-email] like we did in our example.


8. Generate a contact page and drop the shortcode

We can now use the shortcode from our contact form and implement this into a page, post or widget. We’ll use a page as an example.

  • In the current screen right click on the brown bar with the shortcode and select Copy
  • Click Pages > Add New
  • Title : Contact Form 7 Test
  • Now paste the shortcode from above into the textarea
  • Click Publish
  • Click View Page to open the page with the contact form in your browser



9. Test the contact form

The moment of truth! We can finally test our contact form and see whether the email will be delivered to our inbox.

  • Click Send to test the validation of the required fields
  • The message ‘Validation errors occurred. Please confirm the fields and submit it again.‘ should appear on your screen
  • Complete all fields and click Send
  • If all goes well a confirmation message will appear : “Your message was sent successfully. Thanks.


Optional steps


10. Install Really Simple CAPTCHA to avoid spam

When you added the URL field in step 7 you might have noticed the CAPTCHA field among the available tags. In order to use such a field on your contact form you have to install Really Simple CAPTCHA. This extension for Contact Form 7 is used to avoid the submission of spam through your contact form.

  • In your WordPress backend navigate to Plugins > Add New
  • Search : really simple captcha
  • Click Search Plugins
  • Really Simple CAPTCHA will show up in the top of the list (version 1.6 at the time of writing)
  • Click Install Now
  • Click OK
  • Click Activate Plugin
  • You can now use the CAPTCHA field in your contact form


If you don’t install Really Simple CAPTCHA and try to select the CAPTCHA field in your contact form (like you did in step 7 with the URL field), you’ll receive the following message:

Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.


11. Extended configuration of Contact Form 7 – Add a captcha field

As soon as the Really Simple CAPTCHA plugin is activated we’ll be able to add a captcha field to our current contact form.

  • In the sidebar of your WordPress backend click Contact
  • Click Contact form 1
  • Click Generate Tag and select CAPTCHA
  • Name : captcha
  • Copy the first of the two brown codes that you’ll see below
  • Paste this code in the textarea ‘Form‘ above the line <p>[submit “Send”]</p>
  • Do the same with the second of the two brown codes and paste this on the same line
  • Click Save
  • Refresh your contact page for the changes to take effect


12. Install Akismet for extra spam protection

Most likely, you’re already familiar with Akismet. This plugin is known for its comment spam prevention but you can also integrate it with Contact Form 7. If Akismet is already running on your website you can go immediately to the next step. For now, we’ll assume Akismet is not yet enabled on your site.

  • In your WordPress backend navigate to Plugins > Add New
  • Search : akismet
  • Click Search Plugins
  • Akismet will show up in the top of the list (version 2.5.7 at the time of writing)
  • Click Install Now
  • Click OK
  • Click Activate Plugin
  • In the yellow box that appears click enter your Akismet API key
  • Open the link Get your key in a new browser tab and register for a free Akismet API key
  • Go back to your original browser tab and paste the Akismet API key in the appropriate field
  • Click Update options
  • The following message will appear : ‘Your key has been verified. Happy blogging!


13. Extended configuration of Contact Form 7 – Akismet integration

In order for Akismet to be correctly integrated into Contact Form 7, we need to update some of the fields we’ve used on our contact form.

  • In the sidebar of your WordPress backend click Contact
  • Click Contact form 1
  • We’ll have to update some of the tags that we’ve used in the textarea ‘Form
  • Change [url your-url placeholder “website address”] into [url your-url akismet:author_url placeholder “website address”]
  • Change [text* your-name] into [text* your-name akismet:author]
  • Change [email* your-email] into [email* your-email akismet:author_email]
  • Click Save


When a user (or spambot) tries to submit the contact form, his or her credentials will be passed to Akismet. They will verify whether or not these credentials are save. If they’re marked as spam, the email won’t be sent.  Since Akismet makes a judgment based on the url, name and email of the visitor you can use all three fields for the best judgment (like we did in our example).

Akismet enabled shortcode for Contact Form 7

[url your-url akismet:author_url]


[text* your-name akismet:author]


[email* your-email akismet:author_email]


Tip 1 : It’s easy to test whether Akismet is correctly integrated. Try to send an email through the contact form while typing “viagra-test-123″ in the field ‘Your Name‘. You should receive the message ‘Failed to send your message. Please try later or contact the administrator by another method.‘ with an orange border. This indicates that Akismet flagged your submission as spam.

Tip 2 : Does one of the input fields in your contact form disappear after adding the Akismet shortcode? In that case you might have included a ‘placeholder’ shortcode too (like we did with the website address in our example). Be aware to put the Akismet shortcode before the placeholder shortcode.


14. Automatically send a copy of the email to the visitor

It’s always nice to send a copy of your visitor’s email to their own inbox. Contact Form 7 provides two ways to implement this functionality.

Method 1. Additional headers

You can use the field Additional headers that we already employed in step 7 to automatically set the ‘reply to’ email address.

  • Click in the field Additional headers and start a new line
  • Type Cc: [your-email]
  • Click Save
  • tip : You can also type Bcc: to automatically send an email in Blind Carbon Copy (Bcc:).

Method 2. Use ‘Mail (2)’

Method 1 is a quick and easy solution. However, your visitor now faces the same ‘Reply to’ problems like those we described in step 7. When he replies to this email, he will send the email to his own mailbox. Method 2 overcomes this issue, because you can use a totally different Form and Message body.

  • Use mail (2) : check the box
  • To : [your-email]
  • From : (see step 3)
  • Additional headers :  Reply-To:
  • Click Save




15. Security…

In step 2 we explained how to employ the external SMTP server from your online email service like Gmail, Zoho Mail, Outlook or something similar. Therefore, you don’t need any email server software installed on your own dedicated or private server. By using a plugin like WP Mail SMTP it’s very easy to do the necessary configuration. However, it’s important to know there are some security issues involved. As you may remember from step 3, the plugin requires the login credentials for the external SMTP server, in order for contact form 7 to work. Both username and password are not encrypted in the WordPress database. As a consequence, anyone with administrator rights who can access the backend of your WordPress website will know the credentials of your email account.


Final words


16. Conclusion

Since WordPress doesn’t have a contact form by default, you can use the popular Contact Form 7 plugin to overcome this shortcoming. You can also choose to employ an external SMTP server like Gmail, Zoho Mail, Outlook and so on to send all outgoing emails from your website. In that case WP Mail SMTP will help you with the configuration and debugging of your SMTP settings. Finally, to prevent spam from reaching your mailbox you can combine  a Captcha code together with the anti-spam protection from Akismet.


It's only fair to share...Share on Facebook
0Tweet about this on Twitter
Share on LinkedIn


  1. John · May 29, 2013 Reply

    Nice information about contact 7 configuration. For review you can check the article.

  2. techknot · July 14, 2013 Reply

    nice post great article….

  3. Greg Moore · July 23, 2013 Reply

    I appreciate the work that has gone into this plugin and this list of instructions.

    May I suggest that you find a typical person, perhaps someone who knows a little WordPress, or just someone who is reasonably bright, and ask them to do the list of steps in these instructions which you watch.

    I think what you will see is that the person will have great difficulty following these instructions. I have worked as an Oracle DBA for large companies, so I am reasonably technical, yet I was puzzled at several points while attempting to follow these instructions.

    In spite of the fact that you likely think you have laid everything out in a crystal clear way, I think you will be a little surprised when you watch a “normal person” attempt – and fail – to implement these steps.

    Just one little example: Only computer programmers are familiar with syntax that uses and the square brackets.

    When you say:

    From Email :
    From Name : Cool Tricks

    ….many people will actually enter “ for the “From Email.” This may sound ridiculous to you, but then again, on the very next step for “From Name” they are supposed to actually enter “Cool Tricks.” Besides, they don’t have an email address “” and you never say they should make one….

    Here’s a really good one, I think: In Step 7 above:

    Name : your-url
    Default value : website address

    So, what’s the difference between “your-url” and “website address”? Since you use two different terms, I assume these are two different things, but I have no idea what they may be. What’s the difference between my url and my website address? And while we’re on the subject, exactly how am I supposed to enter these? or or – or what? I give up, I don’t know.

    Ultimately, the best thing would be to show people by example. At the top, have a little table that shows:

    Your Website:
    Your Personal Email:
    Your ContactForm Email:

    Then simply have screen shots of what needs to be filled in, using the items listed in the example above. To fill in your form, all people need to do is look at your correctly filled in form, and swap in their information.

    Also, it would be nice to set out clearly at the top that a person will need to create certain email accounts in advance, just so they can do that before they start.

    If you think these instructions are exceptionally clear and I am way off base, just have a person who would *typically* use WordPress plugins – a person who knows WordPress but is not a computer programmer – attempt to follow the steps while you watch.

    Alternately, why not make a utube video, where you complete these steps from start to finish – with no steps left out. Then it would be easy to see what you mean and follow along.



    • Alicia Vaz · January 21, 2014 Reply

      Thanks Greg. I agree with you. Learned a lot but I would have much rather some visual. It took me way longer than I wanted because I kept having to read and reread to make sure I got the instructions clearly. Still haven’t solved my issue but much else was discovered through the experience—which is indeed a good thing for me right now.

    • eduardo · September 2, 2014 Reply

      thanks captain

    • Sergio Lauthier · May 5, 2015 Reply

      Your Post on 2013 …my post to you (and hopefully to all the Super Computer Gurus) my post is not too late 5 May 2015…
      but very well said, at last I find you Greg who understands us few individuals ( I imagine) with little knowledge on Syntax ? ( I think is called)
      because everything I read is … do this …put it there … bla… bla syntax … and copy it to syntax …bla … bla …. bla there ….

      Great post of yours….should be attached to each and every post of them Gurus ….

      Now I feel better


    • John Zoetebier · April 6, 2019 Reply

      Your suggestion to use a table with examples and use the examples in the instructions is exactly what I used in deployment instructions of an application for operations staff.
      These are computer literate people and even they got it frequently wrong, in over 80% of the cases to be sure.
      The mean reason they got it wrong was because the deployment specs they usually got were so terribly written that they did not bother to read the instructions anymore. A nasty and vicious circle.

  4. Reesu · August 18, 2013 Reply

    Thank so much for share. I was finding the same tutorial of adding contact form to my wp site.

  5. Andrea · September 11, 2013 Reply

    Thank you!!! Great instructions and figured out my pesky form that just decided it didn’t want to play anymore. Thanks again!

  6. kunna · September 12, 2013 Reply

    i had done all the setting as above mentioned.but i still getting the following error message…

    “Failed to send your message. Please try later or contact the administrator by another method. ”

    what should i do help me please….

    thank you….

    • Imre · September 22, 2013 Reply

      Hi kunna

      (1) Did you also go through the extra information in the gray box below “Step 7. Basic configuration of Contact Form 7”? There you’ll find an explanation on how to avoid the above error. By default, Contact Form 7 has a configuration that causes trouble for WordPress users who use an external SMTP server like Gmail, Zoho Mail, Outlook or something else to deliver outgoing emails. If you don’t change this default setting, you’ll always face up with the problem as you’ve described in your comment. For the solution, read the gray box below Step 7.

      (2) Also, did you implement the optional “Step 13. Extended configuration of Contact Form 7 – Akismet integration”? If this is the case, whenever somebody tries to send spam-like email, Contact Form 7 will always throw the error (surrounded with an orange border).

  7. sharon · September 28, 2013 Reply

    Thank for sharing,
    Had problems with Contact form 7 reply email address


  8. Humberto Wanke · October 3, 2013 Reply

    Great post! I was searching a way to make my site to work, and had even contact the suport team on my host for any help (and I didn’t get).
    And don’t worry about people don’t understand, not everybody is short in intelligence as some people cold think.

  9. udayakrishna · November 5, 2013 Reply


    Contact-form7 is cool n awesome.

    I have a question?
    I have static HTML webpage (No CMS), for that i need CMS contact form?
    How to add by using “contact-form-7 wordpress plugin” to the static HTML webpage.

    Can anybody help on this??


    • Imre · November 11, 2013 Reply

      Hi Udayakrishna

      Contact Form 7 is a plugin especially developed for WordPress. As far as I know, there’s no standalone version of this software you can use on a regular (read: “non-cms”) website.

      It seems you’d like to implement a “copy & paste” contact form on your non-cms website. In that case, you’ll need some kind of (contact form) software, that’s hosted on external servers. These companies usually provide code snippets to embed their contact form into your own website. By using css, you can style the form the way you like, or you can just stick with their default styling. (Most of the time, they also provide different styling templates you can choose from.) You can even use this kind of software for your WordPress website, as an alternative solution to Contact Form 7 or similar contact form plugins.

      In the past we used for European Airports Taxi, which is one of our clients. It’s a taxi company based in Antwerp (Belgium). They wanted to implement an automatic booking system into their website, so their customers could easily book a taxi by filling in a form. As soon as the customer submits the form, two things will happen:

      (1) The customers receive a personalised copy of their order into their mailbox.
      (2) The booking will be automatically booked into the Google Calendar account of the taxi firm, including all the information of the form that’s been submitted. As a result, they can view all reservations immediately on their smartphone. (Notice you’ll need a Google Apps for Business account if you’d like to implement something similar yourself.)

      The website of European Airports Taxi is currently in Dutch. However, it gives you a good idea of what’s possible if it comes to styling the form. Here you can find the online taxi cab order form. I’d say, give it a try or have a look at some alternative contact forms

  10. Roberto · November 15, 2013 Reply

    thanks for a great article, useful and functional.
    I have configured the sending of email via SMTP and everything is working correctly.

    But if you want to set, in the contact form, a select to choose which address to write, exactly:
    [select* recipient
    “Assistenza Tecnica|”
    “Supporto amministrativo|”

    What should I write in the “To:” and “From:”?

    Thank you.

  11. Dija · December 19, 2013 Reply

    Hello, Thank you so much for your article, I follow all you step but when i test if i follow correctly step i get this error(is juste a error part):
    Test Message Sent
    The result was:
    The full debugging output is shown below:
    object(PHPMailer)#4586 (65) {
    string(5) “UTF-8”
    string(10) “text/plain”
    string(4) “8bit”
    string(35) “SMTP Error: Could not authenticate.”
    string(43) “”
    string(7) “Khadija”
    string(0) “”
    string(0) “”
    string(52) “WP Mail SMTP: Test mail to
    string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
    string(0) “”
    string(69) “This is a test email generated by the WP Mail SMTP WordPress plugin.

    Can you help me thinks.

    • Imre · December 22, 2013 Reply

      Hi Dija

      The third line of your debugging output – bool(false) – already indicates the test email didn’t succeed. As far as I can see there’s something wrong with your login credentials. I would check the following things.
      (1) If you navigate to can you manually login to your email address
      (2) If so, check whether you used the exact same login credentials (username & password) for the configuration of WP Mail SMTP. (See step 3 for this.)

      I also updated step 5 so it might be interesting to read this again.

  12. Andre · January 5, 2014 Reply

    I followed the steps, but i have a problem with step 7. You wrote:
    “To : (see box below)
    From : (see step 3)”

    ok, i entered my address from step 3. if i try to use the contact form, all emails i receive….come from “contact and NOT from the address that the user has typed in.
    can you help me?

    • Andre · January 6, 2014 Reply

      i figured it out:
      from: [your-email] works fine.. i didn’t tried this before….

    • Andre · January 6, 2014 Reply

      and , of course, the mail are arriving from “” too, but i can reply to the users email address…;)

  13. Stephen Alberts · January 13, 2014 Reply

    Any way to get around the security issue in #15? I need a complete secure solution for one of my contact forms on my site. Thanks!

  14. upendra · January 20, 2014 Reply

    i have implemented ur steps but contact for not working at all……..test mail delivered but contact form is still in wait state on submit….wait/…………..

  15. Alicia Vaz · January 21, 2014 Reply

    I did manage to learn more from this post than many others I’ve visited about my issue. I’ve been trying to get email notifications send to my inbox—still no success. But I tend to agree with Greg, I really wish there was some type of visual to follow along. Thanks none-the-less.

    My issues still remain. I’ve installed the Flamingo plugin which seems to do a very good job of capturing form submissions within WordPress. I’d still like to have the messages come direct to my inbox. How can i make that happen?

    And, yes, a box does pop up on my site, below the form, to let me know that the message was sent successfully, but I’m wondering if the form submitter is getting some type of email success message also. Do you know?

    I’ve created a “thank you” page and would like form submitters to be taken there instead after completing the required information and submitting their responses. I’d like the success message box that appears, not to appear. Is that possible?

  16. Bob · January 27, 2014 Reply

    Very nice article bout my favourite ccontact form plugin. Maybe you should add the remark that Akismet only free for personal use. You will need a licence for commercial use. I use Spam Free WordPress as an alternative. Is it possible to integrate this also with Contact Form 7?

  17. Gessé Mendes · February 22, 2014 Reply

    Thank you, very much.
    It’s a very good article.

  18. a · March 12, 2014 Reply

    What options are there for not using a SMTP? My hosting account doesn’t allow it.


  19. Muhammad Numan · April 19, 2014 Reply

    Very detailed and helpful tutorial, i search about contact form 7, i found too many tutorial but not like this , thanks.

  20. Jesse · June 3, 2014 Reply

    I am receiving the following error for the test email:

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP? (5)

    I am currently using InstantWP ( for local dev. Thanks in advance!

  21. aryan · July 11, 2014 Reply

    HI There,
    I really like your contact from so many people suggested, But I could get it work properly, when I use the contact from in the website its not sending emails (Failed to send your message. Please try later or contact the administrator by another method.) . I am sorry I have to admit with Greg Moore was right. Given information and setting up emails is not properly explained, Its like a puzzle game nothing is clearly explain right tot he point.
    I would recommend. use step by step easy visual.
    your email address ( receives emails done)
    I spend almost hour could find my self a proper answer so frustrating myself. even I tried to uninstalled the plugin and installed. even created host emails address no help. could please help if possible.

  22. Sanjay · July 31, 2014 Reply

    Thanks for the tutorial. I would like to know if this is doable, basically I want my form to send the entire info on 1 email address, and sends the ‘selected info’ on another email address. Do you think that’s doable? Thanks in advance!

  23. skywang · August 15, 2014 Reply

    I am following the instruction to config the SMTP sever, but when sending the test email it always shows

    string(35) “SMTP Error: Could not authenticate.”
    string(43) “SMTP Error: Could not connect to SMTP host.”
    string(30) “SMTP Error: data not accepted.”
    string(18) “Message body empty”
    string(18) “Unknown encoding: ”
    string(19) “Could not execute: ”
    string(23) “Could not access file: ”
    string(33) “File Error: Could not open file: ”
    string(35) “The following From address failed: ”
    string(36) “Could not instantiate mail function.”
    string(15) “Invalid address”
    string(25) ” mailer is not supported.”
    string(54) “You must provide at least one recipient email address.”
    string(45) “SMTP Error: The following recipients failed: ”
    string(15) “Signing Error: ”
    string(22) “SMTP connect() failed.”
    string(19) “SMTP server error: ”
    string(30) “Cannot set or reset variable: ”
    string(0) “”
    string(0) “”
    string(0) “”
    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    And I have no idea what is wrong with the configuation, the username and password are correct, i can definitely use them to log in the email account on the website.

    Could you help look into this problem.


  24. Thùy Nguyễn · September 4, 2014 Reply

    Thank you very very much! ^_^

  25. Vic · September 16, 2014 Reply

    Hi, this is avery nice piece but I would like to know one thing.

    Can you make the fields appear but some should not be required.

    For example.

    You have Name
    email address

    but the rquired fields should only be name and email address and you can send the message via conatct form with out putting anything on th subject and message fields…Thanks

    • Abraham Sau · February 22, 2020 Reply

      My default email on wordpress and email address that I used for smtp are different. I do not want get email from my default email, but why I get it?

  26. Rudi Nazar · September 19, 2014 Reply

    I have a question, namely how to change the name of the sender of the second email? thank you

  27. hafeesh · December 11, 2014 Reply


    My contact is working only on localhost only. When I tried in online, it will show (Failed to send your message. Please try later or contact the administrator by another method).

  28. Jason · December 20, 2014 Reply

    I just set up my WordPress instance to use Mandrill and it couldn’t have been easier to set up. Currently you can send up to 12k emails for free, which is well below the amount I need to send. Sign up for an account, install the WP plugin, enter your API key and you’re good to go.

  29. lore · January 3, 2015 Reply

    Hi, I installed Contact Form 7, and WP Mail SMTP, I can send the test mail from WP Mail SMTP, but there’s no way that the form works, it gives a fail send error and i did not get any mail.
    Somebody can help me pls?
    I really will appreciate it.
    And Happy new year for everyone!!

  30. Diet Hebat · January 26, 2015 Reply

    This is really cool, I really like the contact form 7 because it is so easy to be set and design

  31. Ben · February 22, 2015 Reply

    Hello, would this work with the WP plugin woo-commerce (when woo-commerce sends emails) I see there is an option for “all” emails to be sent via SMTP does this override the core mailer completely ? thanks.

  32. Htin Shar · March 9, 2015 Reply

    How to solve this problem?
    SMTP -> ERROR: Password command failed: 534-5.7.14 Please log in via your web browser and then try again.

  33. Alex · March 29, 2015 Reply

    Where is the rest of the post? :)))

  34. Tarek · April 4, 2015 Reply

    Thank you do much for the detailed steps.

    I have installed Contact Form 7, and only the first Mail section is working fine. The section “Mail (2)” is not working at all. I tried to apply all troubleshooting steps I found on the net, and no success.

    Appreciate if someone can help me fix the problem.

    I have WordPress 4.0.1 and Contact Form 7 4.1.1.


  35. Sanjay · May 6, 2015 Reply

    I tired each and every step and the test mail goes to the desired email id but when i try to send through contact form 7 it just gives a error. Please help.

    Website is

  36. Labdo · June 15, 2015 Reply

    Wow. It work! Thx.

  37. Joe · September 21, 2015 Reply

    I ran into an immediate issue with gmail rejecting the attempt to send an email because it had detected an attempt to login from an “app that doesn’t meet modern security standards”. Would this not always prevent this process from being successful?

  38. chris · September 23, 2015 Reply

    I have configured wp mail smtp, and my test email works beautifully. None the less, when I submit a form from Contact7, I get a message that says, “There was a problem processing your comment.” and url of Can you please offer some suggestions?

  39. ashley · September 26, 2015 Reply


    The link to #7 does not work. I have been trying to access it so I can properly link to my Zoho email, but the webpage won’t let me do so.

    Please respond as soon as you can.



  40. jasa paspor jakarta · November 3, 2015 Reply

    web I can not put 123 contact form with the reason clashed Yoast, is there any solution for me??

  41. Edgars · December 27, 2015 Reply

    Ooo…big thanks to you! You save many hours finding solution in SMTP code.

  42. Fatema · April 16, 2016 Reply

    successful message are shown, but no mail send.
    Can’t find any mail in my inbox.

  43. Michael · April 28, 2016 Reply

    Works for me, thanks a lot !

  44. Bharat · May 5, 2016 Reply

    If you are interested in saving the data posted through CF7, check out this plugin I just build:

  45. Funecycle · May 10, 2016 Reply

    Thank you for this guide. But, my problem is still present, and i didn’t receive any mail, despite that:
    Test Message Sent
    The result was:

    Anybody have a advice?

    • Hernan · September 30, 2018 Reply

      Same with me here. My site, when fill the contact form it works and it says that the mail has been sent. But never receive it. The test send email is also working success without any problem. So I dont know what is or where is the problem. Any advice will be great.

  46. Hassan Mushaid · June 22, 2016 Reply

    Getting an error and my contact 7 form is conflicting with it. please help

  47. Hassan Mushaid · June 22, 2016 Reply

    Getting an error when sending test email and conflicting with contact 7 form which fails to send messages when this plugin is activated

  48. Ben · September 7, 2016 Reply


    I see a few other people have already posted this over a year ago with no response, but where is the rest of the article please, I only have up to Step 5 and I am still getting authentication issues even though I am using the correct credentials.

  49. Prescott Chartier · September 30, 2016 Reply

    Ah, there is no step 7 thru 15 on this page.

  50. TFI · October 12, 2016 Reply

    In my case I need to use a custom SMTP server with no authentication on one of my websites, so I just added this at the beginning of functions.php (to override the default PHP.ini smtp option):


    No need to install any plugin. Hope it helps! 🙂

  51. Rahul Varadkar · November 12, 2016 Reply

    Great Post.
    I tried WP Mail SMTP using OUTLOOK Settings. It failed in first attempt because as per the instructions I kept “From Email” as BLANK.
    After reading the debug message I set “From Email” and it WORKED.


  52. Rahul Varadkar · November 12, 2016 Reply

    I tried sending one ZIP file as attachment.
    The email sent successfully to target email id with attachment.
    But the Contact page still shows “Sending” state i.e. processing gif file.
    Any issues with plug-in.

  53. Fernando Alemán · November 25, 2016 Reply

    It works! Very useful information.

    Thanks a lot

  54. hitesh · December 4, 2016 Reply

    Thanks a lot. It solves my purpose.

  55. RK · December 10, 2016 Reply

    from step 6 the content is missing… plz help me with it

  56. Leo · February 3, 2017 Reply

    Had a problem of bool(false) with authentication problems. Fixed it by turning on “less secure apps” feature on gmail acount..

  57. Tim Cox · February 5, 2017 Reply

    Where’s the rest of the article?
    Table of contents has 16 chapters.
    Article only gets to first 5…

  58. Ramiz Syed · May 8, 2017 Reply

    External SMTP means third party server like gmail, yahoo, hotmail, zoho etc.
    what will be other way if hosting provider blocked all mail port 25, 26, 465, 587 etc.
    this plugin not working with WordPress version 4.7.4 it always showing error.

  59. Maria de los Angeles Miranda Bustamante · June 9, 2017 Reply

    Thank you very much!!!

  60. swathi · June 14, 2017 Reply

    Very clear explanation.Very useful information.
    Thanks a lot for this post

  61. Jones · June 28, 2017 Reply

    Thank you for the great tutorial. Helped me a lot. Two questions if someone is still reading these comment…

    1) My client’s server doesn’t have SLL, therefore I can encrypt the traffic, am I right?

    2) I have contact form 7 with multiple forms that all have different recipients (all have same domain thou), therefore I can’t use SMTP authentication, am I right? Any risks here?

    Thank you!

  62. Matt C · July 26, 2017 Reply

    Gmail could not authenticate with this configuration.
    Now You must do this with Gmail API: OAuth 2.0 and received permission to use it.


  63. Robert · October 20, 2017 Reply

    It works! Very useful information.

  64. Abigail · January 23, 2018 Reply

    I feel like I have entered all of the correct information; however I have received the error “405 not allowed, nginx/1.12.2. Can anyone address this?

  65. AMAN KUMAR SINGH · May 18, 2018 Reply

    Nice article but my contact form not work.

  66. Alex Wilson · July 4, 2018 Reply

    Hey, could you please update this post with latest information? and cover some more basic mandatory things we need to implement.

  67. Jar · October 1, 2019 Reply

    Nice post! 🙂

  68. Digimax Derma · October 10, 2019 Reply

    Thanks for sharing. Great post.

  69. Levi · October 18, 2019 Reply

    That was very helpful, thanks!

  70. Mike komis · October 18, 2019 Reply

    Thank you very much!

  71. Kredyty hipoteczne · February 26, 2020 Reply

    It’s very helpful for me! Thanks!

  72. Jennifer G · March 5, 2020 Reply

    My job at Ethereal Design is to analyze websites with interesting content to determine how optimized they are in order to keep our database up to date.

    Since I already created a comprehensive optimization report for you, I’m wondering if you want me to send it over.

    Let me know. I hope its data can help you get the most out of your website.

    Wishing you the best,

    Jennifer Greer
    Website Optimization Specialist

  73. Jahanzaib · May 27, 2020 Reply

    Thank You Very Much For Useful information. Keep It Up

  74. Nandhagopal · June 15, 2020 Reply

    Great work Imre! In-depth details about Contact form 7 configuration!

  75. Coi · June 19, 2020 Reply

    Thank you for sharing!

  76. basia213 · July 8, 2020 Reply

    Great tips. Thanks for good content!

  77. Atlaso · July 31, 2020 Reply

    It’s very helpful for me! Thanks! You make great tutorials.

  78. Gaynelle · August 5, 2020 Reply

    Suchen Sie eine ernsthafte Beziehung? Nur hier echte einzelne MГ¤dchen sind bereit zu mischen! –

  79. Strony Chojnice · August 6, 2020 Reply

    Thank you for this guide it’s very helpful for me!

Leave a Reply