Home / Docs / Email & SMTP
Setup Guide · Email

Email & SMTP setup

Send transactional and broadcast email through MsgHub using your own SMTP server or transactional ESP. This guide covers picking a provider, configuring DKIM/SPF/DMARC (the three DNS records every modern email program needs), connecting MsgHub, and tuning for deliverability.

~45 min including DNS wait SMTP with TLS Last updated: 2026-05-14

Overview

MsgHub doesn't run its own bulk email infrastructure — instead it plugs into your email service. This means you own the sender reputation, your customers see your real domain, and you can switch providers without changing anything in MsgHub.

MsgHub Settings exposes three provider options:

Five things to get right:

  1. Pick a provider — SMTP / SendGrid / Mailgun.
  2. Get credentials from the provider.
  3. Add three DNS records (SPF, DKIM, DMARC) to authenticate your domain.
  4. Paste credentials in MsgHub Settings → Email Configuration.
  5. Save and send a test email.

If you skip DKIM/SPF/DMARC, your email will land in spam. Since February 2024, Gmail and Yahoo enforce strict authentication for any sender doing >5,000 emails/day. By 2026, even small senders see deliverability collapse without authentication.

Prerequisites

Pick a provider

In MsgHub Settings, choose SMTP, SendGrid, or Mailgun. The most common service providers — and which MsgHub option to use for each:

Free tier
Google Workspace SMTP
MsgHub option: SMTP · Good for < 500 emails/day

If you already pay for Workspace, the relay SMTP is included. Hard limit ~2,000/day per user. Easy DKIM via Google.

Amazon SES
MsgHub option: SMTP (use SES SMTP interface) · Good for 1k–1M/day

$0.10 per 1k emails. AWS account required. Cheapest per-message. Sandbox mode until production access is approved.

SendGrid
MsgHub option: SendGrid (native API integration) · 100–100k/day

100 free/day permanent. Paid plans from $20/mo. MsgHub uses the SendGrid Web API directly — just paste the API key.

Bundled
Hostinger / cPanel SMTP
MsgHub option: SMTP · Good for < 200 emails/day

Bundled with most Indian shared-hosting plans. Sufficient for OTP-by-email or order confirmations. Marketing volume will be throttled.

Mailgun
MsgHub option: Mailgun (native API integration)

Developer-friendly API. Paste API key + sending domain + region. Strong delivery analytics, generous free trial.

Postmark, Zoho, Brevo
MsgHub option: SMTP

All three speak standard SMTP. Use their SMTP endpoint in MsgHub's SMTP option. Their UIs have great deliverability tooling.

Recommendation: for transactional volume under 50k/month, start with Workspace or Hostinger via MsgHub's SMTP option — already paid for. For real marketing volume, use AWS SES via SMTP for cost or SendGrid (native MsgHub integration) for analytics.

DKIM, SPF, DMARC — the three records that prevent spam folder

Email authentication is essentially three DNS records that tell receiving mail servers: "This sender really is authorised to send for this domain." Without them, modern Gmail / Outlook / Yahoo treat your email as suspicious.

SPF (Sender Policy Framework)

Lists which IP addresses or providers can send email from your domain. One TXT record per domain.

# DNS record
Type:  TXT
Host:  @           # or your domain
Value: "v=spf1 include:_spf.google.com include:amazonses.com ~all"

Include directive depends on provider:

Google Workspaceinclude:_spf.google.com
AWS SESinclude:amazonses.com
SendGridinclude:sendgrid.net
Postmarkinclude:spf.mtasv.net
Mailguninclude:mailgun.org
Hostingerinclude:_spf.mail.hostinger.com

Combine multiple in one record (max one SPF record per domain is the rule):

v=spf1 include:_spf.google.com include:amazonses.com ~all

DKIM (DomainKeys Identified Mail)

Cryptographic signature on every outbound email. Your provider gives you a public key as a TXT record. Receiving servers verify each email.

Each provider has its own DKIM record format. Examples:

# Workspace
Type:  TXT
Host:  google._domainkey
Value: "v=DKIM1; k=rsa; p=MIGfMA0GCSq..."

# AWS SES (after creating verified identity, SES gives 3 CNAME records)
Type:  CNAME
Host:  {token1}._domainkey.yourdomain.com
Value: {token1}.dkim.amazonses.com

Each provider's dashboard generates the exact records to add — copy-paste verbatim.

DMARC (Domain-based Message Authentication, Reporting & Conformance)

Tells receiving servers what to do when SPF/DKIM fail, and gives you a reporting email for failures.

# Start in monitoring mode for 2 weeks, then tighten
Type:  TXT
Host:  _dmarc
Value: "v=DMARC1; p=none; rua=mailto:[email protected]; pct=100"

Policy values:

Setup: Google Workspace SMTP relay

  1. Workspace Admin Console → AppsGoogle WorkspaceGmailRoutingSMTP relay serviceAdd.
  2. Allow senders: Only registered addresses in your domain. Require TLS encryption: Yes. Require SMTP authentication: Yes.
  3. Save. The relay endpoint is smtp-relay.gmail.com:587.
  4. Username = a Workspace user (e.g. [email protected]). Password = an App Password generated for that user (regular Google password won't work).
  5. Add SPF: v=spf1 include:_spf.google.com ~all.
  6. Generate DKIM: Admin Console → AppsGmailAuthenticate emailGenerate new record → copy the TXT record into your DNS → wait 5 min → click Start authentication.

Setup: AWS SES

  1. AWS Console → SES → pick a region (use ap-south-1 for India audience for lowest latency).
  2. Verified identitiesCreate identity → pick Domain → enter your domain → Easy DKIM with RSA 2048-bit.
  3. SES gives you 3 CNAME records — add to your DNS. Verification takes 1–30 minutes.
  4. By default SES is in sandbox mode — can only send to verified addresses. To go production: Account dashboardRequest production access. Approval usually within 24 hours; needs a clear use-case description.
  5. Create SMTP credentials: SMTP settingsCreate SMTP credentials. Copy the IAM-derived username/password.
  6. SMTP endpoint: email-smtp.{region}.amazonaws.com:587.
  7. SPF: v=spf1 include:amazonses.com ~all.

Setup: SendGrid

  1. SendGrid dashboard → SettingsSender AuthenticationAuthenticate Your Domain.
  2. Pick your DNS host. SendGrid generates 3 CNAME records (DKIM + return-path) — add to DNS.
  3. Click Verify. Usually green in 5–30 minutes.
  4. Create an API key: SettingsAPI KeysCreate API KeyRestricted Access → grant Mail Send full access. Copy the key.
  5. SMTP endpoint: smtp.sendgrid.net:587. Username: literally apikey. Password: the API key.
  6. SPF: v=spf1 include:sendgrid.net ~all.

Setup: Hostinger / cPanel SMTP

Bundled with most shared-hosting plans. Works for low-volume transactional. Don't use for marketing — hard rate limits.

  1. Hostinger panel → EmailsEmail Accounts.
  2. Create a mailbox (e.g. [email protected]). Set a strong password.
  3. Login to Webmail at least once from the panel — first login activates the mailbox. Skipping this causes EAUTH 535 Authentication failed later.
  4. SMTP endpoint: smtp.hostinger.com:465 (SSL) or :587 (TLS).
  5. Username: full email address. Password: mailbox password.
  6. SPF: v=spf1 include:_spf.mail.hostinger.com ~all.
  7. DKIM: Hostinger panel → EmailsEmail ConfigurationDKIM & SPF → enable. Copy the generated TXT to DNS if Hostinger isn't your DNS provider.

Connect to MsgHub

1

Open Email Configuration in Settings

  1. Login to https://app.msghub.info.
  2. Click Settings at the bottom of the left sidebar.
  3. Scroll to the Email Configuration section.
  4. From the Email Provider dropdown, pick one: SMTP / SendGrid / Mailgun.

Fields per provider

If you picked SMTP (use this for Workspace, Hostinger, AWS SES SMTP, Postmark SMTP, Zoho, your own mail server, etc.):

FieldExample value
SMTP Hostsmtp.hostinger.com · smtp-relay.gmail.com · email-smtp.ap-south-1.amazonaws.com
Port587 (TLS, default) — or 465 if you tick "Use SSL/TLS (port 465)"
Use SSL/TLS (port 465)Checkbox — tick for port 465, leave unticked for 587
SMTP UsernameProvider-specific: full email for Workspace/Hostinger/Zoho · apikey literal for some · IAM-derived user for SES
SMTP PasswordApp Password / API key / IAM-derived password (never your account login password)

If you picked SendGrid:

SendGrid API KeyStarts with SG. — created at SendGrid → Settings → API Keys → Mail Send scope

If you picked Mailgun:

Mailgun API KeyStarts with key-
Mailgun Sending Domaine.g. mg.yourcompany.com
RegionUS or EU

Common to all three providers — fill at the bottom of the section:

From Namee.g. "Acme Retail" — shown in recipient's inbox
From Email[email protected] — must be an authenticated identity at your provider

Click Save at the bottom of the Settings page.

There's no explicit "Test Connection" button for email — verify by sending a real email from a campaign or chatbot flow and checking the recipient inbox. SMTP/SendGrid/Mailgun errors surface in the per-message delivery status.

Send a test email

2

Trigger a test

Inside the Email channel page in Settings, click Send Test Email. Enter a target address (your own personal email works). Should arrive within seconds.

Open the test email in Gmail / Outlook and click Show original (Gmail) or View source (Outlook). Look at the authentication results:

Authentication-Results: mx.google.com;
  spf=pass [email protected];
  dkim=pass [email protected];
  dmarc=pass action=none header.from=yourdomain.com

Three pass = you're golden. Any fail or neutral → revisit the corresponding DNS record.

Deliverability tips

  1. Warm up new IPs gradually. If your provider gives you a dedicated IP, send 50 emails day 1, 100 day 2, doubling daily. Skipping warm-up gets you instant spam-folder.
  2. Match From name and content style. Customers should recognise the brand instantly. Generic noreply@ hurts engagement; support@ or orders@ is friendlier.
  3. Don't mix transactional and marketing on the same domain. Use orders.yourdomain.com for transactional (high trust required), news.yourdomain.com for marketing (lower stakes if reputation tanks).
  4. Add a real unsubscribe link to every marketing email. Required by law (CAN-SPAM, GDPR, India DPDP) and ranking signal for Gmail.
  5. Keep complaint rate under 0.1%. Above 0.3% gets you suspended by every major ESP.
  6. Clean bounces and complaints from your list immediately. MsgHub auto-suppresses hard-bounces; soft-bounces retry then auto-suppress after 5 failures.
  7. Don't buy email lists. Permission-based lists outperform bought lists 10× and won't tank your reputation.
  8. Monitor Postmaster Tools. Gmail Postmaster (postmaster.google.com) shows your domain reputation. Aim for High; Bad means you're in trouble.

Troubleshooting

"EAUTH 535 Authentication failed"

"Connection refused" on port 587

Emails land in spam despite passing DKIM/SPF/DMARC

DMARC reports show failures from unexpected IPs

"DKIM signature missing" in email headers

FAQ

Can I use Gmail's regular SMTP (smtp.gmail.com)?

Technically yes, with an App Password. But Google rate-limits regular Gmail SMTP to ~500/day per user. Use Workspace SMTP relay instead for higher limits and proper business sender reputation.

Do I need DMARC if I have SPF and DKIM?

Yes. Without DMARC, receiving servers don't know what to do when SPF/DKIM partially fail (e.g. a forwarder breaks them). DMARC at minimum p=none also gives you visibility — failure reports arrive via email so you can spot spoofing attempts and configuration drift.

What's the difference between transactional and marketing email?

Transactional = triggered by user action (order confirmation, OTP, password reset). Marketing = sent at your initiative to a list (newsletter, promotion). Use separate sub-domains and separate ESPs ideally — marketing complaints shouldn't poison transactional deliverability.

How many emails can I send per day?

Depends entirely on your SMTP provider, not MsgHub. Workspace: ~2,000/user/day. Hostinger: ~200/day. SES: 50,000 free + pay-as-you-go after production access. SendGrid: 100 free/day, paid plans go to millions.

Can I send from multiple From addresses?

Yes. Add each as a separate Email channel in Settings. Each can have its own From name, reply-to, and even SMTP credentials (if you want orders@ through SES and news@ through SendGrid).

Does MsgHub handle bounces and unsubscribes?

Yes. Bounce messages are parsed and the offending address auto-suppressed. Unsubscribe links append a token; clicking removes the contact from future broadcasts. List hygiene is automatic.

Can I see open rates and click rates?

Yes — MsgHub injects an invisible tracking pixel for opens and rewrites links for click tracking. Both can be disabled per-channel if you prefer privacy-respecting plain emails (recommended for transactional).

What's next

Add AI to email responses
Inbound email replies route to the AI just like WhatsApp messages. Same knowledge base.
Send email via REST API
Trigger emails programmatically — order confirmations, OTPs, password resets — from your application code.
Need DKIM/DMARC help?
DNS records can be fiddly. Share screenshots and we'll walk you through.