Title: Invalid address: (punyEncode) SMTP_FROM
Last modified: May 28, 2019

---

# Invalid address: (punyEncode) SMTP_FROM

 *  Resolved [testupdates2](https://wordpress.org/support/users/testupdates2/)
 * (@testupdates2)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/)
 * Getting error while sending test email using wp-mail-smtp,
 * Versions:
    WordPress: 4.9.8 WordPress MS: No PHP: 7.0.33 WP Mail SMTP: 1.4.1
 * Params:
    Mailer: smtp Constants: No ErrorInfo: Invalid address: (punyEncode) 
   SMTP_FROM Host: SMTP_HOST Port: SMTP_PORT SMTPSecure: SMTP_SECURE SMTPAutoTLS:
   bool(true) SMTPAuth: SMTP_AUTH SMTPOptions: {“ssl”:{“verify_peer”:false,”verify_peer_name”:
   false,”allow_self_signed”:true}}
 * Server:
    OpenSSL: OpenSSL 1.0.2r 26 Feb 2019 SMTP Debug: 2019-05-28 05:05:15 
   Invalid address: (punyEncode) SMTP_FROM Sometimes i am getting connection errors
   also. which is related to IsSMTP function. Please suggest some solution.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/#post-11587622)
 * Hi,
 * From the debug log, it seems you’ve incorrectly used the constants. Usually, 
   it should be like:
 * `define( 'WPMS_SMTP_HOST', 'smtp.mailtrap.io' );`
 * Perhaps the value of the constant is generated from the environment variable 
   and it is not processed correctly. Could you please let me know the actual string
   you used to define a host constant from their `wp-config.php`?
 * Thanks!
 *  Thread Starter [testupdates2](https://wordpress.org/support/users/testupdates2/)
 * (@testupdates2)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/#post-11588391)
 * Versions:
    WordPress: 4.9.8 WordPress MS: No PHP: 7.0.33 WP Mail SMTP: 1.4.2
 * Params:
    Mailer: smtp Constants: Yes ErrorInfo: SMTP connect() failed. [https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)
   Host: mail.chocolatesqueeze.com Port: 465 SMTPSecure: ssl SMTPAutoTLS: bool(true)
   SMTPAuth: bool(true) SMTPOptions: {“ssl”:{“verify_peer”:false,”verify_peer_name”:
   false,”allow_self_signed”:true}}
 * Server:
    OpenSSL: OpenSSL 1.0.2r 26 Feb 2019 SMTP Debug: 2019-05-30 13:37:50 
   Connection: opening to ssl://mail.chocolatesqueeze.com:465, timeout=300, options
   =array ( ‘ssl’ => array ( ‘verify_peer’ => false, ‘verify_peer_name’ => false,‘
   allow_self_signed’ => true, ), ) 2019-05-30 13:37:50 Connection: Failed to connect
   to server. Error number 2. “Error notice: stream_socket_client(): SSL operation
   failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:
   unknown protocol 2019-05-30 13:37:50 Connection: Failed to connect to server.
   Error number 2. “Error notice: stream_socket_client(): Failed to enable crypto
   2019-05-30 13:37:50 Connection: Failed to connect to server. Error number 2. “
   Error notice: stream_socket_client(): unable to connect to ssl://mail.chocolatesqueeze.
   com:465 (Unknown error) 2019-05-30 13:37:50 SMTP ERROR: Failed to connect to 
   server: (0) 2019-05-30 13:37:50 SMTP connect() failed. [https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)
 * Now i am getting such error after adding WPMS_SMTP_HOST
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/#post-11598255)
 * Hi,
 * The error seems to be due to the wrong SMTP configurations such as the wrong 
   port. SSL operation failed can be due to server presenting an invalid or expired
   certificate. You will need to consult your hosting provider support to get correct
   SMTP configurations and the certificate.
 * I hope this helps!
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/#post-11621743)
 * Hi [@testupdates2](https://wordpress.org/support/users/testupdates2/) – We haven’t
   heard from you in about a week, so I’m going to go ahead and mark this ticket
   resolved. If you still have questions, though, please feel welcome to continue
   the conversation.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Invalid address: (punyEncode) SMTP_FROM’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

## Tags

 * [godaddy](https://wordpress.org/support/topic-tag/godaddy/)

 * 4 replies
 * 2 participants
 * Last reply from: [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-address-punyencode-smtp_from/#post-11621743)
 * Status: resolved