Welcome! Log In Create A New Profile

Advanced

EmailStartSession(gSessionSMTP)

Posted by ntnati 
EmailStartSession(gSessionSMTP)
January 24, 2025 10:45AM
Hi All

as of yesterday without any changes to the windev source, I am, sometimes, getting an error which says:

The target principal name is incorrect.

when sending emails.

has anybody seen this and perhaps help solve it?

Internet search refers to MSsql configuration. I am using Mysql and nothing has changed since yesterday.

Any help appreciated.

Tanks
Noel
Attachments:
open | download - EmailError.png (42.2 KB)
pao
Re: EmailStartSession(gSessionSMTP)
January 24, 2025 12:48PM
Are you using TLS oe SSL to connect to the SMTP server?

Search "smtp the target principal name is incorrect" and you will find some explanations.


If it's some TLSor SSL problem with the certicate or the name/IP you are using in the connection you can try to use EmailConfigure(emailParameterMode, 1) before the EmailStartSMTPSession

Regards

Paulo Oliveira
Re: EmailStartSession(gSessionSMTP)
January 24, 2025 08:21PM
Thanks Paulo. Will try and let you know.
Re: EmailStartSession(gSessionSMTP)
February 05, 2025 09:57AM
Hi Paulo,

This has worked for the last couple of days. It seems that was the solution. Thank you

Noel
Re: EmailStartSession(gSessionSMTP)
February 05, 2025 11:05AM
so what did you change?
Re: EmailStartSession(gSessionSMTP)
February 09, 2025 08:26AM
I added this line :

EmailConfigure(emailParameterMode, 1) before the emailstartsession


EmailConfigure(emailParameterMode,1)

IF EmailStartSession(gSessionSMTP)=True THEN
EmailSendMessage(gSessionSMTP,anEmail)
RESULT True
ELSE
Info(ErrorInfo(errMessage))
RESULT False
END
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: