Set Up WordPress Mail on India Hosts and Keep It Safe
A plain guide to sending mail from a WordPress site on our host. We look at SMTP, MX records, DMARC, and how to keep mail out of spam.
WordPress does not ship a mail server. It calls the PHP mail()
function. On a container host that call often fails. Or it goes out
through the host's own mail server. That one sends badly. This post
shows how to set up mail for a WordPress site. It runs on our Apps
plans.
Step 1 - Pick a mail service.
We do not sell mail hosting yet. So you need one more for your mail. Two kinds of mail matter here. Transactional mail is what your site sends. It sends it on its own. A reset mail is one. Marketing mail is what you send. You send it to a list.
- Zoho ZeptoMail. It is in India. It bills in rupees. It costs 1 to 2 paisa for each mail. It sends both kinds of mail. It works with Simple Mail Transfer Protocol (SMTP).
- Amazon Simple Email Service (SES). It is made for high volume. It costs $0.10 per 1000 mails over 50,000 a month.
- Brevo. It was once called Sendinblue. It sends both kinds of mail. It starts at $9 a month.
Assume you picked one. You have your SMTP login.
Step 2 - Set up DNS.
The domain name system (DNS) holds your mail records. Add the three it gives you.
- Sender Policy Framework (SPF). It lists the servers that may send for your site.
- DomainKeys Identified Mail (DKIM). It signs your mail. You can prove it is yours.
- Domain-based Message Authentication, Reporting, and Conformance (DMARC). It tells mail servers what to do if a check fails.
For Zoho, here they are.
@ IN TXT "v=spf1 include:zoho.com ~all"
zmail._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSq..."
_dmarc IN TXT "v=DMARC1; p=quarantine; rua=mailto:hello@..."
Ask us on WhatsApp. Our team will set up your mail records. SPF and DKIM show up in 5 to 30 minutes. DMARC can take up to 24 hours on some hosts.
Step 3 - Set up WordPress.
Install the WP Mail SMTP plugin. You can get it free from WordPress. Go to Settings and pick Email.
- From Email:
hello@yourdomain.com. - From Name: Your site name.
- Mailer: Other SMTP.
- SMTP Host:
smtp.zoho.in. - Encryption: Transport Layer Security (TLS).
- SMTP Port: 587.
- Auto TLS: On.
- Authentication: On (username = your Zoho address, password = app password).
Then click Save. Go to the Email Test tab. Send a test mail to yourself. If your login is right and the DNS has spread, it should land. Give it a minute.
Step 4 - Check that your mail lands.
Free tools to check your mail.
- mail-tester.com shows a score. A score of 10 out of 10 is perfect.
- mxtoolbox.com checks your DMARC, DKIM, and SPF.
- Google Postmaster Tools works after you send more than 100 mails.
Common issues.
- DMARC
p=quarantineis the default. Move top=rejectonce your DKIM and SPF match. - BSNL and MTNL have strict spam filters. Pick one that warms up its mail. Zoho and SES do this.
- Contact Form 7 (CF7) and WPForms need their own SMTP set up. The WP
Mail SMTP plugin can do both. It uses the
wp_mailfilter.
Once you have sent a few hundred mails, your mail will land well in Indian inboxes. Keep your DMARC and DKIM clean.