hi,
Iāve just installed locally on my Windows PC (Wamp server) a SuiteCRM version 7.9.8.
php 5.6.31
apache 2.4.27
mysql 5.7.19
everything is installed correctly, and now Iām trying to set up Outbound emails from my G Suite Business account.
when I try with: smtp.gmail.com port 465 and SSL
Iāve also contacted google to set up the account correctly in G Suite and everything is fine from their side.
Iāve disabled 2 step verification as for their request, Iāve forced unsafe apps from the main domain.
Nothing changed.
Other tests:
Iāve also tried with TLS, and nothing changed.
Iāve tried with a TLS account outlook.com and it works fine
Iāve tried with the same G Suite account but with port 25, no ssl, and it works⦠but it only allows email in same domain.
Any suggestion on how to fix this problem?
thank you,
Iāve checked a lot of different forums and tried different things, but none worked for me.
Iāve followed the procedure indicated in the post, and I got this (Iāve removed parts with email):
01/09/18 15:34:40 [8636][1][FATAL] ------------ Entering smtpConnect
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { 3: Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { ) }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtpConnect: { 1: SMTP ERROR: Failed to connect to server: (0) }
01/09/18 15:34:40 [8636][1][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.
01/09/18 15:34:40 [8636][1][FATAL] ------------ Exiting smtpConnect
01/09/18 15:34:40 [8636][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 3: Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { ) }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 1: SMTP ERROR: Failed to connect to server: (0) }
01/09/18 15:34:40 [8636][1][FATAL] smtp send: { 3: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting }
01/09/18 15:34:40 [8636][1][FATAL] ------------ Exiting SugarMailer send
do you have any suggestion after seeing this?
Reading online it looks like itās a coding problem from SuiteCRMā¦but Iām not that technical do understand it.
Any suggestion helps! thanks,
I donāt think itās a coding problem in SuiteCRM, I think itās a certificate configuration problem in your system (thatās what the error seems to be reporting).
Do you really need SSL to connect to them?
If so, have you purchased and installed a certificate identifying your server?
Itās a gmail account for business, so a G Suite email address⦠I tried with a gmail standard address I have and I have the same issue.
Unfortunately I need SSL to send emails outside google domainā¦
within the domain with 25 port it worksā¦but with the SSL or TLL configuration it doesnāt.
Different servers demand different security settings. G Suite is probably tighter in terms of security,
Basically, Googleās server doesnāt seem to like the certificate youāre giving it. Did you get a certificate by purchasing, or via Letās Encrypt?
Or were you just hoping it would work without a certificate? If so, you have to ask G Suite if that is allowed, and what settings you should use.
I do not have experience unfortunately about certificates, Iām sorry if possible can you give some advise on how to proceed?
Iāve searched online but I could not understand exactly what you mean.
I did not get any certificate from G Suite, and we had it since 9 years now.
Iāve already got in contact with G Suite, and checked all security settings on this email account, but they said itās fine and itās the lowest possible settings as security so I should be able to access it remotely.
But if you can get help with that, you would have additional security, better reputation for sending emails (less risk of being considered spam), and you would probably work around your current problem.
SuiteCRM uses PHPMailer, a 3rd party library to send email. Itās giving back this error about the certificate, so we need to be able to provide something different if we want it to workā¦
On another front, see this part in my script?
//Use these to override some fields for tests:
//$this->From = 'me@here.com';
//$this->Sender = 'me@here.com';
//$this->Password='wrong';
//$this->FromName = 'My Name';
try filling in your values there, and remove the respective comment marks ("//"). If it starts working, then SuiteCRM is not carrying the correct configurations into that part of the code. You can also try printing out values onto the logs to see what values itās actually using.
Iām sorry, I saw only now the extra coding to use to try to overwrite values! Iāve filled it and Iāve tried just now.
Still I was not able to send with the same error, it means the problem is before I guess�
print of values override is fine, as values are correctā¦
Below the log I got:
01/10/18 07:16:12 [13824][1][FATAL] ------------ Entering SugarMailer send
01/10/18 07:16:12 [13824][1][FATAL] PHPMailer Send Function override: { FromName: test@******* From: test@******* Host: smtp.gmail.com UserName: test@******* }
01/10/18 07:16:12 [13824][1][FATAL] ------------ Entering smtpConnect
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { 3: Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { ) }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtpConnect: { 1: SMTP ERROR: Failed to connect to server: (0) }
01/10/18 07:16:13 [13824][1][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.
01/10/18 07:16:13 [13824][1][FATAL] ------------ Exiting smtpConnect
01/10/18 07:16:13 [13824][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 3: Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { ) }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 3: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [C:\wamp64\www\SuiteCRM\include\phpmailer\class.smtp.php line 299] }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 1: SMTP ERROR: Failed to connect to server: (0) }
01/10/18 07:16:13 [13824][1][FATAL] smtp send: { 3: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting }
01/10/18 07:16:13 [13824][1][FATAL] ------------ Exiting SugarMailer send
I read on another thread that G Suite is working in SuiteCRM 7.10 Beta 3. If youāre still only trying out SuiteCRM, not actually sing it in production, then I would suggest that you try the Beta.
If it works, and you still need to go with 7.9.x, you can then search GitHub to try and figure out which change makes a differenceā¦
Also, 7.9.9 is coming out soon, maybe this week, so you could try that one.
I just finished the testing with the new SuiteCRM 7.10 Beta 3, but I have unfortunately the same problemā¦no other clues?
does this mean that also the upcoming version 7.9.9 will not solve this problem?
any other suggestion?
thank you very much.
Other than that, you could try asking in the PHPMailer Github: https://github.com/PHPMailer/PHPMailer/issues
(try to be thorough and include a full SMTP log, after obfuscating passwords. The passwords are Base64 encoded (which is NOT encryption), and look like this:
CLIENT -> SERVER: AUTH LOGIN
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6"
SERVER -> CLIENT: 334 VXNlcm5hbWU6
CLIENT -> SERVER: bWVAc2l0ZS5jb20=
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6"
SERVER -> CLIENT: 334 UGFzc3dvcmQ6
CLIENT -> SERVER: MTIzNDU2
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "235 2.7.0 Accepted"
Those parts after āCLIENT -> SERVERā are your username and your password, remove them before posting logs there.
⢠I have āLess secure appsā turned on. https://myaccount.google.com/lesssecureapps
⢠Configured with smtp.gmail.com, SMTP port 587, SMTP Auth, TLS,
⢠I have extension=php_openssl.dll enabled in php.ini, and can verify that it is actually enabled in phpinfo().
⢠Changed $SMTPAutoTLS to āfalseā in include\phpmailer\class.phpmailer.php
⢠I added this to line 79 of include/SugarPHPMailer.php and it worked! This let me know that it was indeed the phpmailer blocking the message from being sent because I was using a self-signed certificate.