Email Related Issues — this archived support thread from the APG vNext community covers a reported issue and its resolution.
Troubleshooting This Issue
- Set
customErrors mode="Off"inweb.configto expose the full error and stack trace. - Check Windows Event Viewer → Application log for ASP.NET exceptions.
- Review Admin Panel → Logs → Error Log for timestamped application errors.
- Restart the IIS Application Pool to clear stale state.
- Verify the database connection string and run any pending upgrade SQL scripts.
Related Resources
Email Troubleshooting Guide for APG vNext
Email delivery problems are among the most common APG vNext support issues. This guide provides a systematic troubleshooting approach covering SMTP configuration, spam filtering, DNS records, and common server-specific issues.
Step 1: Verify SMTP Credentials
# Test SMTP from the server command line:
telnet smtp.yourhost.com 587
EHLO yourforum.com
AUTH LOGIN
[base64-encoded-username]
[base64-encoded-password]
# Should respond with "235 Authentication successful"
Step 2: Check APG Error Log
Admin Panel -> System -> Error Log. Filter for "smtp" or "mail". Common errors:
SmtpException: Connection refused- wrong host/port or firewall blocking outbound 25/587SmtpException: Unable to connect to the remote server- DNS resolution failure for SMTP hostSmtpException: Authentication required- credentials wrong or account disabledSmtpException: Message rejected: TLS required- set enableSsl="true" in web.config
Step 3: Verify SPF and DKIM Records
# Check SPF record (replace yoursite.com):
nslookup -type=TXT yoursite.com
# Should include: v=spf1 include:your-smtp-provider.com ~all
# Check DKIM (replace selector and domain):
nslookup -type=TXT default._domainkey.yoursite.com
Step 4: Common Hosting-Specific Issues
- Shared hosting: many hosts block outbound port 25 - use port 587 with STARTTLS
- Azure App Service: outbound SMTP to port 25 is blocked - use SendGrid or a relay service
- AWS EC2: port 25 throttled - use AWS SES instead
Diagnosing Intermittent Email Delivery Problems
Intermittent email failures — where some emails deliver successfully but others don't — are harder to diagnose than consistent failures. Common causes of intermittent delivery issues include: SMTP server rate limiting (sending more emails per second than the server allows, causing periodic throttling), transient DNS resolution failures on the sending server, SMTP server connection pool exhaustion during high-traffic periods (many users triggering notifications simultaneously), and greylisting on recipient email servers (first delivery attempt rejected, subsequent attempt succeeds after a delay). Use the APG vNext email queue monitor (Admin Panel → System → Email Queue) to see the status of queued emails and whether any are stuck in a retry loop.
Email Security Hardening
APG vNext sends forum notification emails from the application server. Several security measures protect against misuse of this email sending capability:
- Outbound email rate limiting to prevent notification floods that could blacklist your sending IP
- SMTP credential encryption in
web.configusingaspnet_regiis -pe - Email header injection prevention — user-supplied text in notification subjects and bodies is sanitised before sending
- Unsubscribe link in all bulk notifications to comply with CAN-SPAM and GDPR requirements
<add key="APG.Email.RateLimit.PerMinute" value="100" />
<add key="APG.Email.RateLimit.PerHour" value="1000" />
<add key="APG.Email.SanitizeSubject" value="true" />
Email Queue Management During High Traffic
During high-traffic events — a popular new thread receiving hundreds of replies within an hour, or a mass notification after a system announcement — APG vNext's email queue can accumulate faster than the SMTP server can process it. The queue is stored in the apg_EmailQueue table and processed by a background worker. Monitor queue depth during high-traffic periods and adjust the worker's processing rate if delivery delays become unacceptable:
-- Check current email queue depth:
SELECT COUNT(*) AS QueueDepth,
MIN(QueuedAt) AS OldestEmail
FROM apg_EmailQueue
WHERE SentAt IS NULL AND FailureCount < 3;
-- Increase email worker batch size for higher throughput:
<add key="APG.Email.Queue.BatchSize" value="50" />
<!-- Process 50 emails per worker cycle instead of default 10 -->
Preventing Email-Related Forum Reputation Issues
Forum notification emails that land in spam damage both member engagement and the sender domain's email reputation. Once a domain develops a spam reputation, all future emails from that domain — including business email — are affected. Protect your sender reputation by monitoring spam complaint rates (via your SMTP provider's dashboard), processing bounces promptly (hard bounces should result in disabling email for that member address), and ensuring every notification email includes an unsubscribe link that immediately and permanently removes the member from that notification type. APG vNext automates all three of these when properly configured with a transactional email service that supports complaint and bounce webhooks.
Testing Email Delivery Before Going Live
Before making a forum publicly available or enabling email notifications for existing members, perform a complete email delivery test covering all notification types. Create a test member account with a real email address you control, and trigger each notification type: post a reply in a watched thread (tests reply notification), send a private message (tests PM notification), trigger a moderation action (tests moderation notification), and wait for a scheduled digest (tests digest delivery). Verify that each email arrives in the inbox (not spam), renders correctly in both desktop and mobile email clients, and contains correct links back to the specific thread or message that triggered the notification. Document the test results before enabling notifications for all members.
Related Resources
Looking for more help? Browse the support forum or check the Knowledge Base.