PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD20 Email with ssl security
WD20 Email with ssl security
Iniciado por guest, 31,mar. 2016 11:38 - 11 respuestas
Publicado el 31,marzo 2016 - 11:38
Hello,

I use EmailStartSMTPSession(), works great. Now i have a user who has a smtp with ssl securtiy and now i can`t send mail anymore.
I use EmailStartSMTPSession(NoSpace(CUserName),NoSpace(CEmailWw),NoSpace(CSmtpName),NoSpace(SmtpPoort),optionSSL)

Any idea?
Publicado el 31,marzo 2016 - 13:33
Hi Sammy,

Quote
Sammy Broeders

Any idea?

Several:

1. Show us the REAL, COMPLETE code
2. give us the error message returned
3. tell us on what line the error happened

Best regards
Publicado el 31,marzo 2016 - 16:13
/ Create message
Bericht is string
Bericht = "datum: "+DateToString(DateSys())+" e-mail bericht van "+NoSpace(CompanyStats.CBedrijfsNaam)+CR+...
"Telefoon: "+CompanyStats.CTel1+CR+...
"test email - Smtp naam"

//Open a SMTP session UserName en SMTP naam !
EmailStartSMTPSession(NoSpace(CompanyStats.CUserName),NoSpace(CompanyStats.CEmailWw),NoSpace(CompanyStats.CSmtpName),NoSpace(CompanyStats.CSmtpPoort),optionSSL)

IF ErrorOccurred THEN
Error(ErrorInfo())
Here is the error: Connection failed: recipient address not found.
RETURN
END

//Reset e-mail variables
EmailReset()

//Message sender
Email.Sender = "info@xx.nl"

//Message recipient(s)
Email.NbRecipient = 2
Email.Recipient[1] = "x@xnl"
Email.Recipient[2] = "info@xx.nl"

//Message subject and contents
Email.Subject = "E-mail van: SaBroSoft - test Smtp naam: "+NoSpace(CompanyStats.CBedrijfsNaam)
Email.Message = Bericht
EmailSendMessage(NoSpace(CompanyStats.CUserName))

IF ErrorOccurred THEN
Error(ErrorInfo())
END

//Close SMTP session
EmailCloseSession(NoSpace(CompanyStats.CUserName))

DelayBeforeClosing(100)
Info("Test E-mail verstuurd naar SaBroSoft")
DelayBeforeClosing(0)
Publicado el 31,marzo 2016 - 16:45
Hi Sammy,

some secure servers (like gmail) refuse to send if you do not set properly the sender. IN that case, you need ot set up both the .seder and .senderaddress properties, if I remember correctly.

Best regards
Publicado el 31,marzo 2016 - 17:10
Fabrice,

Thanks for the support, this doesn`t work. The error is coming direct by emailstartsmtpsession()
Publicado el 31,marzo 2016 - 17:34
Sammy,
are you sure the error comes from EmailStartSMTPSession?
Maybe the error is already there from a earlier failed EmailSendMessage()
Publicado el 31,marzo 2016 - 18:46
I think it`s something with the SSL securtiy, mayby it`s not working in Windev?
Publicado el 31,marzo 2016 - 18:51
did you try with emailOptionSecuredTLS normally the smtp protocol is secured by tls.
Publicado el 31,marzo 2016 - 18:56
emailOptionSecuredTLS is not work.
Publicado el 31,marzo 2016 - 19:14
CompanyStats.CUserName is a valid email user/email address of that email domain?
Publicado el 31,marzo 2016 - 19:24
Paulo,

Yes it is. (It is in a datafile, but it`s a valid one)
Miembro registrado
34 mensajes
Publicado el 08,abril 2016 - 15:13
Hey Sammy,

are you sure you get the error when try to open the session?

SSL works in windev. I've already used it to send e-mails