PHPMailer can't find config after upgrade to version 7.10.20 #4024

Closed
opened 2026-02-20 16:12:44 -05:00 by deekerman · 8 comments
Owner

Originally created by @iba-jsykes on GitHub (Oct 2, 2019).

Issue

This could be related to the upgrade issues for previous 7.x versions. When trying to test my settings, before or after save, PHPMailer does not see them.

Expected Behavior

Phpmailer should be able to take settings from the admin/email settings page and test outgoing mail.

Actual Behavior

It doesn't seem to get any of the info from the form, here are the logs :

Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: An outgoing mail server is not configured to send emails. Please configure an outgoing mail server or select an outgoing mail server for the mail account that you are using in Settings >> Mail Account.
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][ERROR] send: PHPMailer Exception: { SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

}
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection: opening to smtp.myserver.com:465, timeout=300, options=array ( }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { ) }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. [C:\home\Apache24\htdocs\sugarcrm\include\phpmailer\class.smtp.php line 298] }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.myserver.com:465 (php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. ) [C:\home\Apache24\htdocs\sugarcrm\include\phpmailer\class.smtp.php line 298] }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 1: SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. (0) }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting }
Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] ------------ Exiting SugarMailer send

Context

I'm not sure how your hot fixes get included in older builds, I did apply the proposed , now merged , fix to no avail. This was working before the upgrade.

Your Environment

  • SuiteCRM Version used: 7.10.20
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
    Version 77.0.3865.90 (Official Build) (64-bit)
  • Environment name and version (e.g. MySQL, PHP 7): mysql 5.7 , php 7.1
  • Operating System and version (e.g Ubuntu 16.04): windows server 2016
Originally created by @iba-jsykes on GitHub (Oct 2, 2019). <!--- Provide a general summary of the issue in the **Title** above --> #### Issue This could be related to the upgrade issues for previous 7.x versions. When trying to test my settings, before or after save, PHPMailer does not see them. #### Expected Behavior Phpmailer should be able to take settings from the admin/email settings page and test outgoing mail. #### Actual Behavior It doesn't seem to get any of the info from the form, here are the logs : Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: An outgoing mail server is not configured to send emails. Please configure an outgoing mail server or select an outgoing mail server for the mail account that you are using in Settings >> Mail Account. Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][ERROR] send: PHPMailer Exception: { <strong>SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting</strong><br /> } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection: opening to smtp.myserver.com:465, timeout=300, options=array ( } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { ) } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. [C:\home\Apache24\htdocs\sugarcrm\include\phpmailer\class.smtp.php line 298] } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.myserver.com:465 (php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. ) [C:\home\Apache24\htdocs\sugarcrm\include\phpmailer\class.smtp.php line 298] } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 1: SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. (0) } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] smtp send: { 3: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting } Wed Oct 2 17:34:05 2019 [15076][e18e3432-96cb-a21e-1baf-5d5d82d03fce][DEBUG] ------------ Exiting SugarMailer send #### Context I'm not sure how your hot fixes get included in older builds, I did apply the proposed , now merged , fix to no avail. This was working before the upgrade. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.10.20 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Version 77.0.3865.90 (Official Build) (64-bit) * Environment name and version (e.g. MySQL, PHP 7): mysql 5.7 , php 7.1 * Operating System and version (e.g Ubuntu 16.04): windows server 2016
Author
Owner

@iba-jsykes commented on GitHub (Oct 3, 2019):

Inbound has stopped working as well, also says there is nothing configured.

@iba-jsykes commented on GitHub (Oct 3, 2019): Inbound has stopped working as well, also says there is nothing configured.
Author
Owner

@pgorod commented on GitHub (Oct 3, 2019):

This looks like DNS issues. Can you check if your server can resolve the address smtp.myserver.com correctly and get an IP address?

@pgorod commented on GitHub (Oct 3, 2019): This looks like DNS issues. Can you check if your server can resolve the address `smtp.myserver.com` correctly and get an IP address?
Author
Owner

@iba-jsykes commented on GitHub (Oct 3, 2019):

Yeah, that's the thing, that's not mine, i'm assuming thats some kind of placeholder? Remember, this was working prior to this upgrade.

@iba-jsykes commented on GitHub (Oct 3, 2019): Yeah, that's the thing, that's not mine, i'm assuming thats some kind of placeholder? Remember, this was working prior to this upgrade.
Author
Owner

@pgorod commented on GitHub (Oct 3, 2019):

Ok, but maybe some other thing changed at the same time of the upgrade.

You can connect to your server, and try a ping to the real address of the SMTP server that you have configured. If that doesn't get proper DNS resolution, it explains the error in SuiteCRM.

@pgorod commented on GitHub (Oct 3, 2019): Ok, but maybe some other thing changed at the same time of the upgrade. You can connect to your server, and try a ping to the real address of the SMTP server that you have configured. If that doesn't get proper DNS resolution, it explains the error in SuiteCRM.
Author
Owner

@iba-jsykes commented on GitHub (Oct 3, 2019):

Sure, i can ping, telnet, all the usual stuff. The inbound email actually says that an email server isn't configured, although I see it on the screen and in the db. Definitely a weird bug.

@iba-jsykes commented on GitHub (Oct 3, 2019): Sure, i can ping, telnet, all the usual stuff. The inbound email actually says that an email server isn't configured, although I see it on the screen and in the db. Definitely a weird bug.
Author
Owner

@pgorod commented on GitHub (Oct 3, 2019):

Did you uncomment this line?

github.com/salesagility/SuiteCRM@1391bd278c/include/SugarPHPMailer.php (L452)

@pgorod commented on GitHub (Oct 3, 2019): Did you uncomment this line? https://github.com/salesagility/SuiteCRM/blob/1391bd278c0aa101ae297d27afda4668f7cdbc5b/include/SugarPHPMailer.php#L452
Author
Owner

@iba-jsykes commented on GitHub (Oct 3, 2019):

I did when upping the logging. I was so hopeful that was it, but still :

Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not connect to SMTP host.
Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not connect to SMTP host.
Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][ERROR] send: PHPMailer Exception: { SMTP Error: Could not connect to SMTP host.

}

I'll try and get a better error message.

@iba-jsykes commented on GitHub (Oct 3, 2019): I did when upping the logging. I was so hopeful that was it, but still : Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not connect to SMTP host. Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not connect to SMTP host. Thu Oct 3 21:06:24 2019 [18824][e18e3432-96cb-a21e-1baf-5d5d82d03fce][ERROR] send: PHPMailer Exception: { <strong>SMTP Error: Could not connect to SMTP host.</strong><br /> } I'll try and get a better error message.
Author
Owner

@iba-jsykes commented on GitHub (Oct 3, 2019):

I went back and applied this :
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19163-email-sending-settings#66312

And now both errors are gone, only some authentication issue, which should be totally unrelated.

Thanks for getting me past the obvious!

@iba-jsykes commented on GitHub (Oct 3, 2019): I went back and applied this : https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19163-email-sending-settings#66312 And now both errors are gone, only some authentication issue, which should be totally unrelated. Thanks for getting me past the obvious!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4024
No description provided.