Test email not working

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi there,
Just installed a fresh nopcommerce 4.3 version on smarterasp.
for some reason send test email fails - the error is attached below.

I'm trying to send an email to my gmail account:

configuration includes:
host: smtp.gmail.com
port: 587

In a previous nop version (4.0) with the same mail configuration the test mail is sent.
Any help is most appreciated!!!

An error occurred while attempting to establish an SSL or TLS connection. This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of the following reasons: 1. The server is using a self-signed certificate which cannot be verified. 2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate. 3. A Certificate Authority CRL server for one or more of the certificates in the chain is temporarily unavailable. 4. The certificate presented by the server is expired or invalid. Another possibility is that you are trying to connect to a port which does not support SSL/TLS. It is also possible that the set of SSL/TLS protocols supported by the client and server do not match. See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#SslHandshakeException for possible solutions.
3 years ago
shamilal wrote:
Hi there,
Just installed a fresh nopcommerce 4.3 version on smarterasp.
for some reason send test email fails - the error is attached below.

I'm trying to send an email to my gmail account:

configuration includes:
host: smtp.gmail.com
port: 587

In a previous nop version (4.0) with the same mail configuration the test mail is sent.
Any help is most appreciated!!!

An error occurred while attempting to establish an SSL or TLS connection. This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of the following reasons: 1. The server is using a self-signed certificate which cannot be verified. 2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate. 3. A Certificate Authority CRL server for one or more of the certificates in the chain is temporarily unavailable. 4. The certificate presented by the server is expired or invalid. Another possibility is that you are trying to connect to a port which does not support SSL/TLS. It is also possible that the set of SSL/TLS protocols supported by the client and server do not match. See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#SslHandshakeException for possible solutions.


Hi Shamilal,
I've also faced this issue in past and here are my findings on this.

I presume that you are using your email password directly here. In this case you need to enable setting called 'Less Secure App' in your google account.

You can find it here. Enable it to get the smtp emails working. But by enabling this we might have security threats for this account.
https://www.google.com/settings/security/lesssecureapps
Enable access and smtp test email will work.

OR

Suggested OR Best OR Trusted/Secured way is to use
App Password
Here you will find details about it OR you can just google it about 'App Password in Google Account'
https://myaccount.google.com/security

Security -> Signing In To Google
Under the second step verification, You can see option called 'App Password'
If you don't see that first enable the 2-Step verification there.
You can generate 16 digit password for App. Just give a name for future reference.
Something like 'MySiteMailAccess' OR 'nopCSiteSmtpAccout'.

Now with your email address in username in smtp setting at nopCommerce admin site.
use this newly generated 16 digit password without any space between. It will show space while displaying it.

If you click SSL check box user port 465
Else   587 will also work.
I mean both port will work.  465 with SSL Checked & 587 with SSL UnChecked.

Let me know if this helps.

Thanks,
Ajay
3 years ago
Gmail has restrictions.  See if this post helps
https://www.nopcommerce.com/en/boards/topic/23569/solved-551-authentication-required-with-smtpgmailcom/page/2#183996
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.