E-mails stored on website hosting server take up space and the limited number of files (iNodes). Here I’ll explain:
- How to set up so that e-mails are stored on Gmail account (of choice, or a specially created one for the website alone), not on the hosting server.
- How to, from a Gmail account, send e-mails using [email protected], instead [email protected]
- How to receive mails sent to [email protected] from a Gmail account.
Since e-mails are important for business correspondence, I prefer having them stored “in the cloud”. Also, such setup makes website migration easier and faster.
Integration with e-mail clients other than Gmail (like Mozilla Thunderbird for example) is done using a similar principle. Also, mail clients can be set up to leave e-mail copies on the server, either permanently, or for a limited time (30 days, or so).
For understanding instructions given here, it is required to understand and gather the needed information as explained in the post: E-mail setup in cPanel and DNS. Picture 1 below gives a brief reminder:
Take the time, do as explained in the noted article, write down the needed information, then continue reading here.
It is also understood you have a Gmail account, of course.
2. Setting up sending with SMTP from Gmail
First we will set up e-mail sending, using SMTP. Open Gmail account, then click on the small sprocket (“Settings”).
Then click on “Accounts and Import” -> “Add another email address”.
After clicking the option (2) in picture 3, you’ll get a pop-up window to setup the account.
After clicking on “Next Step”, you get the following screen:
Don’t let the point (4) in the picture above confuse you – that is the safer option and TLS encryption will be used (if certificate and the hosting server allow it, as they should).
Now you should receive an e-mail with a control code that should be entered as shown in picture 7. E-mail can be checked from cPanel’s webmail.
The verification code should be copied to Google’s window:
Now you can choose the default sending address for the Gmail account:
This concludes the Gmail setup for sending e-mail using website’s SMTP. Testing is explained in chapter 4.
3. Setup receiving POP3 email to Gmail
How to setup e-mails sent to the website’s address to be received to Gmail, and deleted off the hosting server so they don’t fill up the inbox there.
Go to Gmail account settings, as shown in picture 2. Only this time choose “Add a mail account”.
After this, you’ll get a pop-up screen to enter the e-mail address:
Now you will need the info shown in picture 1 and explained in chapter 1 (you might want to re-read it if picture 12 is not clear enough). In this case, POP3 port for TLS connection is 995, so we’ll use that:
You could also choose to not delete the retrieved e-mails off the server (“Leave a copy of retrieved message on the server”). Note that in time the left emails will pile up, taking a lot of storage space and making website migration and website backup creation more difficult.
And that’s it. Now it’s time to test whether it all works properly.
The quickest way to test both sending and receiving is to send an e-mail from your address, to your address. But also try sending to at least one Gmail and one “non-Gmail” address – just in case. See if those e-mails arrive properly. Also, send an e-mail to your address from one Gmail and one “non-Gmail” address to confirm you can receive them.
After this, if it’s all OK, the last check is done using a mail testing tool. Go to mail-tester.com. Then follow the instructions I wrote in the article about SMTP mail sending with WordPress, just send the mails using the Gmail account, not WordPress.
Testing is very important, don’t skip this part – if anything is malfunctioning with your website e-mail delivery, you should be the first one to know.