Title: Error when using SMTP
Last modified: February 1, 2023

---

# Error when using SMTP

 *  Resolved [annabelle17](https://wordpress.org/support/users/annabelle17/)
 * (@annabelle17)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-using-smtp/)
 *     ```wp-block-code
       Versions:WordPress: 6.1.1WordPress MS: NoPHP: 7.4.33WP Mail SMTP: 3.7.0
   
       Params:Mailer: smtpConstants: NoErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server Additional SMTP info: php_network_getaddresses: getaddrinfo failed: Name or service not knownHost: localhostPort: 25SMTPSecure: string(0) ""SMTPAutoTLS: bool(false)SMTPAuth: bool(false)
   
       Server:OpenSSL: OpenSSL 1.1.1p 21 Jun 2022Apache.mod_security: No
   
       Debug:Email Source: WP Mail SMTPMailer: Autre SMTPSMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server Additional SMTP info: php_network_getaddresses: getaddrinfo failed: Name or service not known
   
       SMTP Debug:2023-02-01 16:38:22 Connection: opening to localhost:25, timeout=300, options=array()
   
       2023-02-01 16:38:22 Connection failed. Error #2: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known [/home/jwpbwium1157/public_html/wp-includes/PHPMailer/SMTP.php line 389]
   
       2023-02-01 16:38:22 Connection failed. Error #2: stream_socket_client(): unable to connect to localhost:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) [/home/jwpbwium1157/public_html/wp-includes/PHPMailer/SMTP.php line 389]
   
       2023-02-01 16:38:22 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
   
       SMTP Error: Could not connect to SMTP host. Failed to connect to server
       ```
   
 * Hi, I am using WP Mail SMTP to direct contact forms to my email, however in the
   past few days the entries were not sending and there was an error:
 * Mailer: Other SMTP
   SMTP Error: Could not connect to SMTP host. Failed to connect
   to serverSMTP server error: Failed to connect to server Additional SMTP info:
   php_network_getaddresses: getaddrinfo failed: Name or service not known
 * I have been using this plug-in with my hosting provider for a while now so on
   my end nothing has changed to mae this happen. I called GoDaddy to try figure
   this out but their solution was toreset mailing system on their end which didn’t
   help.
 * Please advise for further steps!

Viewing 1 replies (of 1 total)

 *  Plugin Support [Dake](https://wordpress.org/support/users/dakeg/)
 * (@dakeg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-using-smtp/#post-16430548)
 * Hi [@annabelle17](https://wordpress.org/support/users/annabelle17/)
 * Thank you for creating your own support thread.
 * Just for reference, please let us know what plugins you currently have active.
 * Also, to confirm if this is a mailer specific or server specific issue, we would
   recommend setting up another mailer.
 * The easiest mailer to set up that doesn’t require altering DNS records is the
   [Google/Gmail mailer](https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/).
 * I hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Error when using SMTP’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dake](https://wordpress.org/support/users/dakeg/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-using-smtp/#post-16430548)
 * Status: resolved