isSMTP(); $phpmailer->Host = SMTP_HOST; $phpmailer->SMTPAuth = SMTP_AUTH; $phpmailer->Port = SMTP_PORT; $phpmailer->Username = SMTP_USER; $phpmailer->Password = SMTP_PASS; $phpmailer->SMTPSecure = SMTP_SECURE; $phpmailer->From = SMTP_FROM; $phpmailer->FromName = SMTP_NAME; } //------------- // Place this code in wp-config.php // Configures WordPress to use SMTP server define( 'SMTP_USER', 'username' ); // Username to use for SMTP authentication define( 'SMTP_PASS', 'password' ); // Password to use for SMTP authentication define( 'SMTP_HOST', 'smtp.server.com' ); // The hostname of the mail server define( 'SMTP_FROM', 'from@emailaddress.tld' ); // SMTP From email address define( 'SMTP_NAME', 'Jane Doe' ); // SMTP From name define( 'SMTP_PORT', '587' ); // SMTP port number - likely to be 25, 465 or 587 define( 'SMTP_SECURE', 'PHPMailer::ENCRYPTION_STARTTLS' ); // Encryption system to use - ssl or tls define( 'SMTP_AUTH', true ); // Use SMTP authentication (true|false) define( 'SMTP_DEBUG', 0 ); // for debugging purposes only set to 1 or 2 //------------- /* I was using the following settings in LocalWP but this caused the site to crash and stop responding. I recommend you use PHPMailer::ENCRYPTION_STARTTLS and port 587 instead of tls and 25 when using PostMarkApp.com and LocalWP as tls and port 25 didn't work longterm locally. 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 */ //------------- ?>