Support Thread

Email Does Not Work Properly

Email Does Not Work Properly — APG vNext Guide

Email Does Not Work Properly — this archived support thread from the APG vNext community covers a reported issue and its resolution.

Troubleshooting This Issue

  1. Set customErrors mode="Off" in web.config to expose the full error and stack trace.
  2. Check Windows Event Viewer → Application log for ASP.NET exceptions.
  3. Review Admin Panel → Logs → Error Log for timestamped application errors.
  4. Restart the IIS Application Pool to clear stale state.
  5. Verify the database connection string and run any pending upgrade SQL scripts.

Related Resources

APG vNext Email Not Working - Comprehensive Fix Guide

If APG vNext is not sending emails at all, or emails are arriving in spam, this guide covers the full diagnostic and fix process. The most common root cause is a misconfigured SMTP server - but DNS reputation issues and IIS app pool identity restrictions also cause email failures in specific hosting environments.

Quick Checklist

  • SMTP host, port, username, and password are correct in web.config
  • The IIS app pool identity has permission to make outbound TCP connections
  • Port 587 (or 465) is not blocked by the server firewall
  • The From address domain matches your SPF record
  • APG vNext error log shows no SmtpException entries

Fix: Use a Transactional Email Service

For reliable email delivery, replace a direct SMTP connection with a transactional email service (SendGrid, Mailgun, AWS SES). These services handle deliverability, bounce processing, and spam compliance automatically:

<!-- SendGrid SMTP relay -->
<network host="smtp.sendgrid.net"
         port="587"
         userName="apikey"
         password="SG.your-sendgrid-api-key"
         enableSsl="true" />

Fix: Emails Going to Spam

If emails arrive but land in spam, the issue is sender reputation - not the SMTP connection. Fix:

  • Add SPF record: v=spf1 include:sendgrid.net ~all
  • Configure DKIM signing (via your email service)
  • Set DMARC policy: v=DMARC1; p=quarantine; rua=mailto:[email protected]

Windows Server Email Sending Without IIS SMTP

Older APG vNext installations may have been configured to use the IIS SMTP service as a local mail relay. The IIS SMTP service is deprecated and unavailable in Windows Server 2019 and later. If your server was relying on IIS SMTP and it stopped working after a Windows Server upgrade, switch to a direct external SMTP relay or transactional email service immediately. The IIS SMTP service should not be used for production email in any modern deployment regardless of the Windows Server version, as it lacks TLS support, bounce handling, and deliverability management features expected by modern email infrastructure.

Cloudflare and Email Sending

If your forum's domain is proxied through Cloudflare, email delivery is not affected — Cloudflare only proxies HTTP and HTTPS traffic, not SMTP (port 25, 465, 587). Email sending from the web server goes directly to the SMTP server without passing through Cloudflare. However, Cloudflare does affect email deliverability indirectly through its management of your domain's DNS records. Ensure SPF and DKIM records are added through the Cloudflare DNS interface rather than the registrar, as Cloudflare's DNS overrides the registrar's DNS when the domain is proxied. Incorrect DNS record configuration through Cloudflare is a frequent cause of email deliverability issues for forum operators new to Cloudflare.

Monitoring Email Delivery Health

Set up ongoing monitoring for email delivery health using a free tool like MXToolbox to check SPF, DKIM, and DMARC configuration. Run these checks after any DNS changes to confirm email records remain valid. Subscribe to your SMTP provider's status page to receive immediate notification of any service degradation that might delay forum notification delivery. For high-volume forums, consider using a secondary SMTP provider as a fallback in APG vNext's email configuration — if the primary provider has an outage, APG vNext automatically fails over to the secondary, ensuring notification emails continue to deliver during provider maintenance windows.

Firewall and Network Considerations for Email

Windows Server firewall and network-level firewalls can silently block outbound SMTP connections without producing useful error messages in the application. A connection that appears to hang with a long timeout and then fails is often a firewall block rather than an SMTP server problem. To diagnose, test the SMTP port from the web server using PowerShell before configuring APG vNext:

# Test SMTP port connectivity from PowerShell on the web server:
Test-NetConnection -ComputerName smtp.sendgrid.net -Port 587
# TcpTestSucceeded: True means the port is reachable
# TcpTestSucceeded: False means a firewall is blocking the connection

# If port 587 is blocked, also try port 465:
Test-NetConnection -ComputerName smtp.sendgrid.net -Port 465

If port testing confirms the SMTP port is reachable but emails still don't send, the issue is in the authentication credentials or SMTP configuration — not the network. If the port is unreachable, work with your hosting provider or network administrator to open the outbound SMTP port in the firewall rules.

Related Resources


Looking for more help? Browse the support forum or check the Knowledge Base.