Contact Forms are great to let website visitors contact you for any queries or for specific purpose. Contact Forms are found on most websites nowadays. When we build a website, we usually include a “Contact form" on the website for users to contact us. Once we buy a domain and hosting services from a service provider to host the website, we also usually get email address along with it. And it looks professional to have emails with the website domain name instead of using internet email such as gmail or Yahoo mail. In this post, we shall see how to setup Contact Form and how to receive emails sent from the website.
This example is based on a contact form on a Drupal/WordPress website hosted on Linux Host provided with CPanel hosting control panel. On Drupal, contact us form can be created using “Contact” module which is now included in Drupal 7 Core, and similarly on WordPress, it can be created using plugins such as Contact Form 7. Assuming that contact form has been setup with whatever module or plugins you chose, let’s configure to receive emails on another email address. Before that, we’ll also discuss other ways to read those emails.
Before we setup a contact form on website, we need an email address obviously.
Creating an email address on the host
- Login to CPanel (Linux Hosting)
- In the CPanel Home Page, under “Mail”, click on “Email Addresses”
- Create some email address to be used in the website such as “info@yourdomain.com” or “admin@yourdomain.com” etc. as per your need.
- Set the required passwords etc. as required
Configure the Contact Form on the website with the email address created
Now configure your website using the email created. Emails will be sent to this email address and this email address will also be used by the website to send notifications etc. to registered users. This email is usually asked during WordPress or Drupal or any other CMS installation. If you has entered random email during installation, you can change it once you have the email address created.Example how to add valid email address on WordPress or Drupal.
- On WordPress: Admin Dashboard > Settings > General >Email Address: enter the email created above here. The site will also use this address to sent email from.
- On Drupal: Admin > Configuration > Site Information > Email Address
On WordPress, usually people prefer to use plugins such as Contact Form 7. Install the plugin and setup the Contact Form.
Usually, mostly people will use the email that is configured for the website for the contact form as well. Now that the website is configured with email address, message left on the contact form should be received by the email address we configured on the website. In some cases, separate email can be used to configure the contact form if desired.
Testing Contact Form
- Access your website and send a test message from the Contact Form.The email should be received by the email address you created on the domain.
- Login to access the mail using webmail provided by host (Go to control panel on the host if required)
- See whether you received the message sent from the Contact Form.
- Drupal unable to send emails using the contact forms [a host issue]
- How To Resolve WordPress Unable to Send Messages/Mails from Contact Form?
Various ways to access the website email
The email address that is setup for the domain is usually accessed via webmail by default which is provided by the host. The webmail can be accessed without the need to log in to the host control panel using the webmail link. But if webmail is inconvenient for you, then the email can also be accessed in other ways as described below.
1. Access the mail using webmail
- Login to CPanel / website host control panel
- Under “Mail”, click “WebMail”
- A URL will be displayed for WebMail access. Something like: http://yourdomain:xxxx where xxxx is port number.
- Copy the address and access it via a browser.
- Login with the email configured and password you set.
- Save this URL for later use so that you don't have to login to CPanel each time.
2. Configure an email client for the email
If accessing mails via webmail is not convenient for you, you can also setup an email client for the same email such as on Outlook or Thunderbird.
- Login to CPanel / website host control panel
- Under “Mail”, click “WebMail” > Secure WebMail login
- Click on “Configure Mail Client”
- In the following page, Auto Scripts can be downloaded to configure your favorite email client
- Manual settings to configure mail client would also be displayed. If not, contact your host how to configure email client.
- You will now receive emails in your email client.
3. Forward to another email address
This option is the most preferred for some, since they already have an email from Yahoo or Gmail before they even created the website. So they may prefer to continue receiving emails there. To forward emails to another address, follow the steps:- Login to CPanel
- Under “Mail” > Click “Forwarders”
- Click “Add Forwarder”
- “Address to Forward” :Enter the email address to forward. This email is one that we created earlier in CPanel
- Destination: enter the email address to forward
- Click “Add Forwarder” at the bottom
- Fill out the contact form on the website and send a test message
- You should now have the message in the email address provided in forwarder.