PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WD22 - Gmail SMTPSession error
WD22 - Gmail SMTPSession error
Débuté par Giovanni Carella, 30 sep. 2017 09:13 - 8 réponses
Posté le 30 septembre 2017 - 09:13
Hi all,
i use this code to send e-mail.

SMTPTEST is EmailSMTPSession SMTPTEST.Name=user SMTPTEST.Password=password SMTPTEST.Port=587 SMTPTEST.ServerAddress="smtp.gmail.com" SMTPTEST.Option = emailOptionSecuredTLS EmailStartSession(SMTPTEST)
from yesterday i the EmailStartSession give me this error:

"System error detected by WLanguage security mechanism.
System Error Details: Una catena di certificati elaborata correttamente termina in un certificato radice proveniente da un'Autorità di certificazione non presente nell'elenco locale."

Anyone have a solution?
Posté le 02 octobre 2017 - 12:21
Hi,

I had a massive problemwith sending emails via the Gmail SMTP service. My code had worked absolutely fine for several years and then suddenly it started to fail - not every day, but repeatedly at certain times of the week.

My suspicion is that it's something Goole has done.

My advice to you is to stop using the Gmail SMTP service. I switched my application to using the SMTP servers offered by my hosting company, but there are others available, e.g. SMTPTOGO (although this is only free up to a point).

Best of luck!
Reg
Posté le 02 octobre 2017 - 18:33
Hi,
i found a solution.

Google have changed the authentication if in the google account is activate the two step authentication.

If this option in activated you must create a password for the specific role

https://myaccount.google.com/apppasswords

and you start the smtp session with this new password....
Posté le 02 octobre 2017 - 18:36
Ok. I made sure it wasn't activated when I had my problem so you've clearly hit another roadblock.

I still strongly advise you to switch away from gmail's smtp servers...
Posté le 03 octobre 2017 - 14:59
A solution has been published in a FAQ

http://faq.windev.com/15563-faq-read.awp

Errors might randomly occur when using EmailStartSMTPSession with smtp.gmail.com because some Google certificates can't be verified by Windows. This problem is likely to be fixed by Google eventually.

In the meantime an easy solution is to add this line to your code :

// insert before calling EmailStartSMTPSession
EmailConfigure(emailParameterMode, 1)
Posté le 03 octobre 2017 - 15:34
Sounds good, but that command is not available in my admittedly old verion of windev :-)
Posté le 03 octobre 2017 - 15:49
Hi, yes, you'd need version 22 for that!
Posté le 03 octobre 2017 - 15:50
Perfect.... Thanks felix....
Posté le 04 octobre 2017 - 08:41
Hi

Thank you for that Felix.
Fixed my code today as well!

Sarah