Form Delivery Reliability for Your Own Site: SMTP Setup, Delivery Rates, Retries, and Logs

A "submitted successfully" message on your site's form doesn't mean the customer actually got your email. WordPress sends mail through PHP mail() by default, with no SMTP authentication and no domain signing, so delivery rates are naturally...

表单投递可靠性:从提交到收件箱的四段链路Form Delivery Reliability: a four-stage pipeline from submit to inbox PHP mail() 不是邮件服务 —— 不配置 SMTP 和域名认证,投递率天然低于 60%PHP mail() is not a mail service — without SMTP and auth, delivery sits below 60% 环节Stage 关键配置Key config 失败信号Failure signal 恢复动作Recovery 1 表单提交1. Submit 字段校验 + 反垃圾Field validate + anti-spam WP Forms / Fluent FormsWP Forms / Fluent Forms honeypot + reCAPTCHAhoneypot + reCAPTCHA JS 报错 / 500JS error / 500 前端不提交Frontend never posts 关闭 JS 校验兜底Server-side validate 检查 PHP 错误日志Check PHP error log 常见死法一:端口 25 被主机商封禁,SMTP 发不出去Failure 1: port 25 blocked by host, SMTP cannot connect 换 587 或 465 端口,用 TLS/SSL 加密,不要用 25Use 587 or 465 with TLS/SSL, never plain 25 常见死法二:SPF/DKIM 未配置,邮件进垃圾箱Failure 2: SPF/DKIM missing, mail lands in spam DNS 添加 SPF TXT + DKIM CNAME + DMARC 记录Add SPF TXT + DKIM CNAME + DMARC in DNS 投递率合格线:收件箱到达率 ≥ 95%,硬 bounce ≤ 2%,软 bounce ≤ 5%Healthy: inbox rate ≥ 95%, hard bounce ≤ 2%, soft bounce ≤ 5% 失败重试:指数退避,第1/5/15/60分钟各试一次,最多4次,仍失败则告警Retry: backoff at 1/5/15/60 min, max 4 attempts, then alert 日志保留 30 天:记录 from/to/subject/响应码/重试次数,每周抽查 5 封Keep logs 30 days: from/to/subject/code/retries, sample 5 weekly 不要相信”已发送”提示 —— SMTP 返回 250 只是对方服务器接收,不等于进了收件箱“Sent” is not delivered — SMTP 250 means accepted, not inbox
The four stages of form delivery: submission, SMTP relay, ESP relay, inbox, plus the two common ways it dies

Form Delivery Reliability for Your Own Site: SMTP Setup, Delivery Rates, Retries, and Logs

Bottom line first: A “submitted successfully” message on your site’s form doesn’t mean the customer actually got your email. WordPress sends mail through PHP mail() by default, with no SMTP authentication and no domain signing, so delivery rates are naturally below 60%. The right approach is to connect a dedicated SMTP relay service (SendGrid/Mailgun/Postmark), set up the three DNS records SPF/DKIM/DMARC, and configure 4 retries with exponential backoff. The passing bar is an inbox placement rate of 95% or higher and hard bounces at 2% or less.

1. Why PHP mail() can’t be trusted

Many site owners think the job is done once the form shows a confirmation page after “Submit.” In reality, WordPress’s default wp_mail() goes through PHP’s built-in mail() function, which has no sender authentication, no TLS encryption, and no dedicated IP pool, so the emails it sends are very likely to be flagged as spam by Gmail and Outlook.

This isn’t a plugin problem, it’s a protocol-level problem. mail() hands the email to the local MTA (mail transfer agent), which connects directly to the recipient’s MX server on port 25, but most cloud hosts (Alibaba Cloud, Tencent Cloud, AWS) block outbound port 25 by default to prevent spam. The result: the form shows success, but the email never went out.

A counterintuitive take:The more “hassle-free” the sending method, the more orders you lose. Skipping an SMTP plugin may save you half an hour of setup, but in practice you could lose 20% to 40% of your inquiries every month, and you’d have no idea, because the submission page shows a green checkmark. For how to design form fields to balance conversion and filtering, see Inquiry Form Field Design and Conversion Rate.

Sending method Average delivery rate Setup complexity Best for
PHP mail() (default) 40% to 60% Zero configuration Not recommended for any production site
Host’s local SMTP 60% to 75% Low For test environments
Third-party SMTP relay (free tier) 85% to 92% Medium Up to 5,000 emails per month
Dedicated transactional email service 95% or higher Medium-high More than 5,000 emails per month

2. SMTP setup: choosing a plugin and its settings

Setting up SMTP on WordPress doesn’t require touching code, just install a plugin. There are three main choices: WP Mail SMTP (most popular, clean interface), FluentSMTP (open source and free, supports failover across multiple providers), and Post SMTP (strongest logging). Pick one; don’t install two at once, as they’ll conflict.

There are 7 key settings: SMTP host, port (587 or 465, never 25), encryption (TLS or SSL), username, password/API key, sender email, and sender name. The sender email must match your domain, like noreply@yourdomain.com. You can’t send from a Gmail or QQ address, or your SPF record won’t line up and your mail goes straight to spam.

Example: you use SendGrid as your SMTP relay. Set the host to smtp.sendgrid.net, port 587, encryption TLS, username is always apikey, and the password is the API key you generated in your SendGrid dashboard. Set the sender to noreply@yourdomain.com, then add three records in your DNS panel, which we cover in the next section.

Spec Correct value Common mistake
SMTP host smtp.sendgrid.net / smtp.mailgun.org localhost or your local IP
Port 587 (TLS) or 465 (SSL) 25, which your host blocks
Encryption TLS (587) or SSL (465) “None”, sending in plain text
Username apikey for SendGrid, postmaster@mg.xxx for Mailgun Your own email address
Sender noreply@yourdomain.com A personal Gmail/QQ address
From name Company name + department Blank, or garbled Chinese characters

3. Domain authentication: SPF, DKIM, and DMARC records

Configuring the SMTP plugin is only step one. Why should the recipient’s mail server trust that this email came from you? Because of three DNS records: SPF (which servers may send mail for your domain), DKIM (a digital signature that proves the message wasn’t tampered with), and DMARC (what to do when a message fails those checks). Miss any one of them and your deliverability suffers.

SPF is a TXT record that looks roughly like v=spf1 include:sendgrid.net ~all, meaning “only SendGrid’s servers may send mail from my domain; everything else gets a soft fail.” DKIM is a CNAME record: your SMTP provider supplies the public key, and the recipient uses it to verify the signature. DMARC is also a TXT record, starting with v=DMARC1. Set p=none first and watch it for a week, then switch to p=quarantine.

How to check: enter your domain in MXToolbox or the Google Admin Toolbox Checkup tool. All three need to come back green. If SPF shows “not found” or DKIM shows “no key”, add the missing records in your DNS panel, wait 15 minutes for them to take effect, and test again. To see how domain compliance fits with GDPR, see Compliance foundation for global sites.

Record type Role Minimum setup Verification tool
SPF (TXT) Declares authorized sending servers v=spf1 include:provider ~all MXToolbox SPF Lookup
DKIM (CNAME/TXT) Digital signature that prevents tampering The selector record from your provider DKIM Core Key Check
DMARC (TXT) Policy and report collection v=DMARC1; p=none; rua=email Google Admin Toolbox
MTA-STS (TXT) Enforces TLS-encrypted delivery v=STSv1; id=20260921 MXToolbox MTA-STS

4. Deliverability metrics and retrying failed sends

Setting up SMTP and DNS is only half the job — you have to watch the metrics. Three numbers matter most: inbox placement rate (the share that lands in the inbox, not spam), hard bounce rate (address or domain doesn’t exist — permanent failure), and soft bounce rate (mailbox full or server busy — temporary failure). Healthy thresholds are placement ≥ 95%, hard bounces ≤ 2%, soft bounces ≤ 5%.

Don’t rely on your plugin’s default retry behavior. WordPress form plugins send once and call it done — if it fails, the page shows no error. The right approach is to add a retry layer: wait 1 minute after the first failure, 5 minutes after the second, 15 minutes after the third, and 60 minutes after the fourth. If all four attempts fail, fire an alert (to your backup email or WeCom) and save the inquiry to your database for manual resend.

Example: a customer in Germany submits the form at 11 p.m. their time (6 a.m. in Beijing), just as SendGrid is doing maintenance and SMTP returns a temporary error. Without retries, that inquiry is lost. With exponential backoff, the fourth attempt succeeds 60 minutes later, and the customer wakes up the next morning to your auto-reply. For how to set your first-response time, see First-response SLA and conversion rate for inquiries.

Metrics Healthy range Alert thresholds Action
Inbox placement rate ≥ 95% Below 90% Check SPF/DKIM logs
Hard bounce rate ≤ 2% Above 5% Clean up invalid email addresses
Soft bounce rate ≤ 5% Above 10% Check your SMTP provider’s status
Retry success rate ≥ 80% Below 50% Switch to a backup SMTP channel
Daily submissions Baseline ±20% Drop of 50% or more Check whether front-end JS is throwing errors

5. Logging and weekly self-checks

No logs means no way to troubleshoot. The Post SMTP plugin includes an email log table that records the from, to, subject, send time, SMTP response code, and retry count for every email. FluentSMTP has similar features. Keep logs for at least 30 days and auto-purge older ones so they don’t bloat your database.

Do a self-check once a week: pull 5 recent emails and check whether the SMTP response codes are in the 250 range (250 = success, 4xx = temporary failure, 5xx = permanent failure). Then send a test email from Gmail to yourself, click “Show original,” and confirm SPF=pass, DKIM=pass, and DMARC=pass are all green. If any one fails, check your DNS immediately.

Another easy thing to miss: your form plugin needs logging too. If a user submits and a JS error prevents the request from ever being sent, nothing shows up in the SMTP log. So add Nginx access log monitoring at the server level and track the volume of POST requests to /wp-admin/admin-ajax.php (or your REST API endpoint). If it drops by more than 50% on any given day, something is wrong on the front end. For how to set up site monitoring, see Site monitoring and alerts.

Logging layer What to record Retention period How to view
Form submission log Field values, IP, UA, timestamp 90 days Plugin dashboard / database table
SMTP send log Response codes, retry counts, error messages 30 days SMTP plugin log page
ESP delivery logs Opens, clicks, complaints, bounces Provider dashboard, permanent SendGrid/Mailgun dashboard
Nginx access log POST request volume, status code breakdown 14 days grep access.log on the server

FAQ

Do I really need an SMTP plugin for WordPress forms, or can I just use PHP mail()?
You need one on a live site. PHP mail() has no sender authentication, and most cloud hosts block port 25, so actual delivery rates sit at 40% to 60% and a lot of inquiries quietly land in spam. Install WP Mail SMTP or FluentSMTP, connect it to the free tier of SendGrid/Mailgun, and you can have it set up in half an hour with delivery rates above 90%. On a test site you can use mail() temporarily, but you must switch before you go live.
Do I need all three records, SPF, DKIM and DMARC, or is SPF alone enough?
SPF alone isn’t enough. SPF only verifies the sending server’s IP, DKIM verifies the message content hasn’t been tampered with, and DMARC tells the recipient what to do with mail that fails. Miss any one of the three and Gmail’s email security score takes a hit. Minimum setup: SPF TXT + DKIM CNAME (provided by your provider) + DMARC starting at p=none for a week of observation, then switch to p=quarantine. Once all three show green in MXToolbox, you’re done.
Which SMTP port should I use, 25, 587 or 465?
Use 587 or 465, not 25. Port 25 is the traditional unencrypted sending port, and mainstream cloud hosts like Alibaba Cloud, Tencent Cloud and AWS block outbound port 25 by default to prevent spam, so it won’t connect even if you enter it. Port 587 upgrades to encryption with STARTTLS, port 465 uses SSL directly, and either works. Go with 587 first, since modern clients support STARTTLS best. If your host also blocks 587, switch to 465.
How do I check delivery rates, and where can I see whether mail landed in the inbox or the spam folder?
Check three places together. First, look at the response codes in your SMTP plugin log: 250-series means accepted, 4xx/5xx means failed. Second, check the aggregate stats in your SendGrid/Mailgun dashboard, which show hard bounces, soft bounces and complaint rates. Third, run your own test: send a test email to Gmail, Outlook and Yahoo and see which tab it lands in. The exact inbox placement can only be scored with a third-party tool like Mail-Tester, so test once or twice a month per site.
The form submits but no email goes out. What’s the fastest way to troubleshoot?
Troubleshoot in four layers. Layer 1: check the browser Console for JS errors and confirm the request was actually sent. Layer 2: open your WordPress SMTP plugin’s email log and see whether the message is there and what response code it returned. Layer 3: check the Nginx access.log to confirm the POST request reached the server. Layer 4: log into your SMTP provider’s dashboard and look up the delivery events for that email. Fix whichever layer is broken, and don’t skip around. The usual culprits are a blocked port or missing SPF.
Is the free SMTP quota enough, and when should I start paying?
SendGrid’s free tier allows 100 emails a day, Mailgun’s allows 5,000 a month, and Postmark has no free tier but offers a 100-email trial. A B2B standalone site typically gets 100 to 500 form submissions a month, and once you add auto-replies and notification emails, monthly volume usually stays under 2,000, so the free tier is enough. Upgrade to a paid plan once you exceed 5,000 sends a month or the free tier starts throttling you. Paid plans start at about $19.95/month for SendGrid and about $35/month for Mailgun.

Final thoughts

Form delivery is the most overlooked leak on a standalone site. Most site owners watch traffic and conversion rates, but never verify whether the email behind that “submitted successfully” message actually reached the customer. Set up SMTP once and add three DNS records, spend two hours, and you can cut your monthly lost orders by more than half.

Three steps to get it done. First, install an SMTP plugin this week and connect it to a free SendGrid or Mailgun tier. Second, add SPF, DKIM, and DMARC records in your DNS panel and verify they all pass green in MXToolbox. Third, set up 4 retries with exponential backoff and spot-check 5 emails a week for delivery status. Do these three things and your form delivery reliability has a floor.

One line worth remembering: the green checkmark on your form only means “the server received it,” not “the customer saw it” — SMTP, DNS, and the spam folder stand in between.

Crater
Crater Crater experts

Official Organization · Crater

Crater is a go-global services company specializing in WordPress standalone site development + Google SEO + GEO full-funnel growth, serving sectors including smart hardware, industrial equipment, SaaS, and new energy.

Product CapabilitiesMethodology WhitepaperIndustry Report
965articles shared
78knowledge base articles