# SMTP Configuration Guide This guide explains how to configure different SMTP providers in the Campaign application. ## SMTP Types The Campaign application supports four types of SMTP configurations: 1. **Regular SMTP** - For standard SMTP servers like Titan, Gmail, Outlook, etc. 2. **Local Server** - Uses the server's built-in mail service (no authentication required) 3. **Mail Relay** - Specifically configured for Mail Relay service 4. **Amazon EC2** - For Amazon EC2 instances ## Regular SMTP Configuration Regular SMTP can be used with any standard SMTP provider. Here are the configuration details for popular providers: ### Titan Email - **Server**: smtp.titan.email - **Port**: 465 - **Encryption**: SSL - **Authentication**: Required (username and password) ### Gmail - **Server**: smtp.gmail.com - **Port**: 587 - **Encryption**: TLS - **Authentication**: Required (username and password) - **Note**: For Gmail, you may need to enable "Less secure app access" or create an "App Password" if you have 2-factor authentication enabled. ### Outlook/Office 365 - **Server**: smtp.office365.com - **Port**: 587 - **Encryption**: TLS - **Authentication**: Required (username and password) ### Yahoo Mail - **Server**: smtp.mail.yahoo.com - **Port**: 587 - **Encryption**: TLS - **Authentication**: Required (username and password) ### Hostinger - **Server**: smtp.hostinger.com - **Port**: 465 - **Encryption**: SSL - **Authentication**: Required (username and password) ### Zoho Mail - **Server**: smtp.zoho.com - **Port**: 587 - **Encryption**: TLS - **Authentication**: Required (username and password) ## Local Server Configuration The Local Server SMTP option uses the server's direct SMTP service on port 25 without requiring authentication. This is ideal for installations where the campaign application is hosted on the same server that handles mail delivery. - **Server**: Automatically detected (server IP or localhost) - **Port**: 25 - **Encryption**: None - **Authentication**: Not required ## Mail Relay Configuration Mail Relay is a specialized service for sending bulk emails. - **Server**: smtp1.s.ipzmarketing.com - **Port**: 587 - **Encryption**: TLS - **Authentication**: Required (username and password) ## Amazon EC2 Configuration For Amazon EC2 instances, you can use the local SMTP service. - **Server**: localhost - **Port**: 25 - **Encryption**: None - **Authentication**: Not required ## Troubleshooting SMTP Issues If you're experiencing issues with SMTP configuration, try the following: ### 1. Verify Credentials Make sure your username and password are correct. Some providers may require an "App Password" instead of your regular password, especially if you have two-factor authentication enabled. ### 2. Check Port and Encryption Settings Different providers require different port and encryption settings: - Port 25: Usually used without encryption (not recommended for external SMTP) - Port 587: Usually used with TLS encryption - Port 465: Usually used with SSL encryption ### 3. Check Server Restrictions Some hosting providers block outgoing connections on certain ports, particularly port 25. Check with your hosting provider if you're having issues. ### 4. Test with the Test Button Use the "Test" button in the SMTP settings page to send a test email. This will provide detailed debug information if there are any issues. ### 5. Check SSL/TLS Requirements Some providers have strict SSL/TLS requirements. If you're having issues, try different encryption settings. ### 6. Check for Whitespace in Credentials Make sure there's no extra whitespace in your username or password. ### 7. Try Local Server SMTP If all else fails, try using the Local Server SMTP option, which bypasses external SMTP servers and uses the server's built-in mail service. ## Common Error Messages and Solutions ### "Authentication failed" - Verify your username and password - Check if you need to use an "App Password" - Make sure you're using the correct authentication method ### "Could not connect to SMTP host" - Check if the SMTP server address is correct - Verify that the port is not blocked by your hosting provider - Try a different port or encryption setting ### "Connection timed out" - The SMTP server may be down or unreachable - Your hosting provider may be blocking the connection - Try a different SMTP provider or the Local Server option ### "SSL certificate problem" - The SSL certificate of the SMTP server could not be verified - Try using the TLS encryption instead of SSL - Check if your server has the latest CA certificates installed ## Best Practices 1. **Use TLS or SSL Encryption**: Always use encryption when possible for security. 2. **Test Before Bulk Sending**: Always send a test email before sending to a large group. 3. **Monitor Delivery Rates**: Keep an eye on delivery rates and adjust settings if needed. 4. **Use Local Server for Same-Host Deployments**: If your application is on the same server as your mail service, use the Local Server option for best performance. 5. **Set Appropriate Daily Limits**: To avoid being flagged as spam, set appropriate daily sending limits based on your provider's recommendations.