How can I configure an SMTP Server?

Question

I’m trying to follow the instructions here: https://gist.github.com/butlerblog/7e4dbafcbc61b15505ee8ca90510f1e7

But I’m getting confused. I’m not sure what arguments to pass where. Here is what I have:

define( 'SMTP_USER',   'mylogin@login.ca' );    // The email address I use when I log in to the wp-admin page
define( 'SMTP_PASS',   '123password' );       // The password I use when I log in to the wp-admin page
define( 'SMTP_HOST',   'localhost' );    // I am testing this on localhost
define( 'SMTP_FROM',   'mylogin@login.ca' ); // Also the email address I use for logging in on the wp-admin page
define( 'SMTP_NAME',   'My Site Name' );    // SMTP From name
define( 'SMTP_PORT',   '25' );                  // SMTP port number - likely to be 25, 465 or 587
define( 'SMTP_SECURE', 'tls' );                 // Encryption system to use - ssl or tls
define( 'SMTP_AUTH',    true );                 // Use SMTP authentication (true|false)
define( 'SMTP_DEBUG',   1 );                    // for debugging purposes only set to 1 or 2

I am pretty sure I am not sending in the right stuff. When I try to use wp_mail, I get the following error in the debug log:

[0] => SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Any advice?
Thank you!

0
ellen 2 months 0 Answers 9 views 0

Leave an answer