Title: Migrating to PHP7, cannot connect error
Last modified: November 4, 2017

---

# Migrating to PHP7, cannot connect error

 *  Resolved [bradclarke365](https://wordpress.org/support/users/bradclarke365/)
 * (@bradclarke365)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/)
 * Hi,
 * I recently migrated to php7 and can no longer connect to smtp.
 * Here is the error the test email produces:
 * CLIENT -> SERVER: EHLO [http://www.my-domain.com](http://www.my-domain.com)
    
   CLIENT -> SERVER: STARTTLS SMTP Error: Could not connect to SMTP host.CLIENT -
   > SERVER: QUIT SMTP ERROR: QUIT command failed: SMTP connect() failed. [https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)
 * In between “smtp error: quit” and “smtp connect failed” I have a bunch of diamond
   shaped question marks. Not sure if it’s relevant.
 * So far I have re entered all the credentials, changed the credentials to new 
   credentials, uninstalled then reinstalled with new credentials, nothing has worked.
 * Thoughts?
 * Thanks
 * Brad

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

 *  [Alexander C.](https://wordpress.org/support/users/alexanderfoxc/)
 * (@alexanderfoxc)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/#post-9652057)
 * Hi Brad [@bradclarke365](https://wordpress.org/support/users/bradclarke365/).
 * To clarify, have you upgraded PHP version on the server where everything was 
   working just fine and, after the upgrade, it stopped?
 *  Thread Starter [bradclarke365](https://wordpress.org/support/users/bradclarke365/)
 * (@bradclarke365)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/#post-9652193)
 * Hey Alex,
 * Correct, everything was fine on php5.6 and now that I have moved to php7 it’s
   creating that error. I built a new php7 server from scratch and migrated to it,
   if it makes a difference.
 * You helped me a few weeks back and updated easy wp smtp to allow it to send from
   an alternative email. It was working great!
 * Thanks
 * Brad
 *  [Alexander C.](https://wordpress.org/support/users/alexanderfoxc/)
 * (@alexanderfoxc)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/#post-9658646)
 * Hey Brad [@bradclarke365](https://wordpress.org/support/users/bradclarke365/),
   sure I remember you 🙂
 * I think your issue is not plugin-related, but rather your server-config related.
   For example, in order for PHP mail function to work, here are the requirements:
 * [http://php.net/manual/en/mail.requirements.php](http://php.net/manual/en/mail.requirements.php)
 * I’m not a server expect though, so this is just a wild guess.
 * PS: Sorry for late reply, been busy with some offline stuff.
 *  Thread Starter [bradclarke365](https://wordpress.org/support/users/bradclarke365/)
 * (@bradclarke365)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/#post-9660606)
 * Thanks Alex,
 * I’ll take a look and come back if I need further assistance.
 * Thanks
 * Brad

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

The topic ‘Migrating to PHP7, cannot connect error’ is closed to new replies.

 * ![](https://ps.w.org/easy-wp-smtp/assets/icon.svg?rev=3158017)
 * [Easy WP SMTP – WordPress SMTP and Email Logs: Gmail, Office 365, Outlook, Custom SMTP, and more](https://wordpress.org/plugins/easy-wp-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-wp-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-wp-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-wp-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-wp-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-wp-smtp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [bradclarke365](https://wordpress.org/support/users/bradclarke365/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/migrating-to-php7-cannot-connect-error/#post-9660606)
 * Status: resolved