Email and SMTP Configuration
Email and SMTP Configuration
Configure email and SMTP settings to enable email notifications, password resets, and user communications in Flatboard 5.
Email Overview
Flatboard 5 uses email for:
- User Registration - Email verification
- Password Reset - Password recovery links
- Notifications - Discussion and post notifications
- Administrative - System notifications
- User Communication - Private messages (if enabled)
SMTP Configuration
Why SMTP?
SMTP (Simple Mail Transfer Protocol) provides:
- Reliable Delivery - Better delivery rates than PHP mail()
- Authentication - Secure email sending
- Tracking - Delivery and bounce tracking
- Professional - Proper email headers and formatting
Basic SMTP Setup
Access: Admin Panel > Settings > Email
- Enable SMTP - Turn on SMTP sending
- SMTP Host - Your mail server address
- SMTP Port - Usually 587 (TLS) or 465 (SSL)
- Encryption - Choose TLS or SSL
- Username - SMTP authentication username
- Password - SMTP authentication password
- From Email - Sender email address
- From Name - Sender display name
Common SMTP Providers
Gmail
Host: smtp.gmail.com
Port: 587
Encryption: tls
Username: your-email@gmail.com
Password: (App Password - see below)**Gmail App Password Required**
Gmail requires an "App Password" instead of your regular password:
- Enable 2-Step Verification in Google Account
- Go to Google Account > Security > App Passwords
- Generate app password for "Mail"
- Use this password in SMTP settings
Outlook/Office 365
Host: smtp.office365.com
Port: 587
Encryption: tls
Username: your-email@outlook.com
Password: (Your account password)SendGrid
Host: smtp.sendgrid.net
Port: 587
Encryption: tls
Username: apikey
Password: (Your SendGrid API key)Mailgun
Host: smtp.mailgun.org
Port: 587
Encryption: tls
Username: (Your Mailgun SMTP username)
Password: (Your Mailgun SMTP password)Amazon SES
Host: email-smtp.region.amazonaws.com
Port: 587
Encryption: tls
Username: (Your SES SMTP username)
Password: (Your SES SMTP password)Testing Email Configuration
Test Email Function
Use the built-in test email:
- Go to Admin Panel > Settings > Email
- Enter test email address
- Click "Send Test Email"
- Check inbox for test email
Manual Testing
Test via CLI:
php app/Cli/console.php email:test your-email@example.comTroubleshooting Test Emails
If test email fails:
- Check SMTP Settings - Verify all settings correct
- Check Credentials - Ensure username/password correct
- Check Firewall - Ensure SMTP port not blocked
- Check Logs - Review error logs for details
- Test Connection - Use telnet to test SMTP connection
# Test SMTP connection
telnet smtp.gmail.com 587Email Templates
Customizing Templates
Email templates can be customized:
- Registration Email - Welcome message
- Password Reset - Reset instructions
- Notification Email - Discussion/post notifications
- Admin Notifications - System notifications
Template Variables
Use variables in templates:
{site_name}- Forum name{site_url}- Forum URL{user_name}- User's name{reset_link}- Password reset link{verification_link}- Email verification link
Email Verification
Enabling Email Verification
- Go to Admin Panel > Settings > Users
- Enable "Email Verification"
- Configure verification email template
- Save settings
Verification Process
- User registers account
- Verification email sent
- User clicks verification link
- Account activated
- User can log in
Resending Verification
Users can request new verification email:
- Login page > "Resend Verification Email"
- Enter email address
- New email sent
Password Reset
Password Reset Flow
- User clicks "Forgot Password"
- Enters email address
- Reset email sent with link
- User clicks link
- User sets new password
- User can log in
Reset Email Configuration
Configure reset email:
- Reset Link Expiry - How long link is valid (default: 1 hour)
- Reset Email Template - Customize email content
- Rate Limiting - Limit reset requests per hour
Email Notifications
User Notifications
Users receive emails for:
- New Replies - Replies to subscribed discussions
- Mentions - When mentioned in posts
- Private Messages - New private messages (if enabled)
- Quotes - When quoted in posts
Notification Preferences
Users can configure:
- Email Frequency - Immediate, daily digest, weekly
- Notification Types - Which notifications to receive
- Unsubscribe - Unsubscribe from specific notifications
Access: User Profile > Settings > Notifications
Email Best Practices
Deliverability
Improve email deliverability:
- SPF Records - Configure SPF for your domain
- DKIM - Set up DKIM signing
- DMARC - Configure DMARC policy
- Reputation - Maintain good sender reputation
Content
- Clear Subject Lines - Descriptive subjects
- Plain Text Alternative - Include plain text version
- Unsubscribe Links - Include unsubscribe option
- Professional Formatting - Clean, professional design
Security
- Use TLS/SSL - Encrypt SMTP connections
- Strong Passwords - Use strong SMTP passwords
- Limit Access - Restrict SMTP access
- Monitor Logs - Review email logs regularly
Troubleshooting
Emails Not Sending
Check:
- SMTP settings are correct
- Credentials are valid
- Firewall allows SMTP port
- SMTP server is accessible
- Check error logs
Common Issues:
- Authentication Failed - Wrong username/password
- Connection Timeout - Firewall blocking or wrong host
- SSL/TLS Error - Wrong encryption type
- Port Blocked - ISP blocking SMTP port
Emails Going to Spam
Solutions:
- Configure SPF records
- Set up DKIM signing
- Use reputable SMTP provider
- Avoid spam trigger words
- Include unsubscribe links
Rate Limiting
Some providers limit sending:
- Gmail - 500 emails/day (free), 2000/day (Workspace)
- SendGrid - Based on plan
- Mailgun - Based on plan
- Amazon SES - Starts with sandbox mode
Advanced Configuration
Multiple SMTP Accounts
For high-volume sites, consider:
- Multiple Providers - Use different providers
- Load Balancing - Distribute across providers
- Failover - Automatic failover if one fails
Email Queue
For better performance:
- Queue Emails - Queue instead of sending immediately
- Background Processing - Process queue in background
- Retry Logic - Retry failed sends
Email Logging
Enable email logging:
- Log All Emails - Log sent emails
- Log Failures - Log failed sends
- Delivery Tracking - Track delivery status
Resources
- Configuration Guide - General settings
- Troubleshooting - Common issues
- Security Guide - Email security
Last updated: February 23, 2026