• Resolved testupdates2

    (@testupdates2)


    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)
  • 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

    (@testupdates2)

    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
    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

    Now i am getting such error after adding WPMS_SMTP_HOST

    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!

    Hi @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.