[NSFW] How to correctly debug SMTP Issues on WordPress?
-
Hi,
I’m setting up mailing service in my site using AWS SES SMTP Interface, but I’m encountering issues. First, I assure that the credentials are correct. I checked them so many times. Second, I don’t want to use a plugin to setup SMTP Server because of resources usage, resources are very scarce! What complicates my life is the fact I’m unable to successfully debug SMTP errors, If I could do that I’d already fixed the issue.
I’m trying to setup SMTP in my theme’s functions.php file
// SMTP email settings define( 'SMTP_username', 'SMTP_USERNAME' ); // username of host like Gmail define( 'SMTP_password', 'SMTP_PASSWORD' ); // password for login into the App define( 'SMTP_server', 'email-smtp.us-east-1.amazonaws.com' ); // SMTP server address define( 'SMTP_FROM', 'BUSINESS_MAIL' ); // Your Business Email Address define( 'SMTP_NAME', 'SMTP_NAME' ); // Business From Name define( 'SMTP_PORT', '587' ); // Server Port Number define( 'SMTP_SECURE', 'tls' ); // Encryption - ssl or tls define( 'SMTP_AUTH', true ); // Use SMTP authentication (true|false) define( 'SMTP_DEBUG', 1 ); // for debugging purposes only<code></code> add_action( 'phpmailer_init', 'my_phpmailer_smtp' ); function my_phpmailer_smtp( $phpmailer ) { $phpmailer->isSMTP(); $phpmailer->Host = SMTP_server; $phpmailer->SMTPAuth = SMTP_AUTH; $phpmailer->Port = SMTP_PORT; $phpmailer->Username = SMTP_username; $phpmailer->Password = SMTP_password; $phpmailer->SMTPSecure = SMTP_SECURE; $phpmailer->From = SMTP_FROM; $phpmailer->FromName = SMTP_NAME; }
I tried to set WP_DEGUG true in the file wp-config.php, but nothing. Does anyone know a better approach?
- This topic was modified 2 years, 10 months ago by . Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
- This topic was modified 2 years, 9 months ago by .
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[NSFW] How to correctly debug SMTP Issues on WordPress?’ is closed to new replies.