Saturday, March 5, 2016

Contact Form 7 SMTP Setup

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. 

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

    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!

    GMAIL
    SMTP Host : smtp.gmail.com
    Type of Encryption : SSL
    SMTP Port : 465

    ZOHO MAIL
    SMTP Host : smtp.zoho.com
    Type of Encryption : SSL
    SMTP Port : 465

    YAHOO
    SMTP Host : smtp.mail.yahoo.com
    Type of Encryption : SSL
    SMTP Port : 465

    OUTLOOK
    SMTP Host : smtp.live.com
    Type of Encryption : TLS
    SMTP Port : 587


    4. Some Change in contact form 7

    open file plugins\contact-form-7\includes/mail.php

    find $headers = "From: $sender\n";

    Replace With

    $headers = "From $sender\n";


    Now Test its working. :)

     

1 comment:

  1. Wonderful post and such a fantastic information that you gave to us. Thank you so much for it. You made a good site and also you sharing the best information on this topic. I am impressed with your site’s blog. Thank you all
    ZohoSetup

    ReplyDelete