PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WD20 Dont send email
WD20 Dont send email
Débuté par Julio Cesar, 15 nov. 2017 14:59 - 8 réponses
Posté le 15 novembre 2017 - 14:59
Hi

I'm in trouble with my windev 20 app. Just stop to send email. I try with 2 gmail accounts, smtp2go and my internet servisse provider. Nothing Works.

Here is the code:

// cria sessão de envio de email MySession is EmailSMTPSession MySession..Name = "user@gmail.com" MySession..Password = "password" MySession..ServerAddress = "smtp.gmail.com" MySession..Port = 587 MySession..Option = emailOptionSecuredTLS // cria o anexo da mensagem myAnexo is EmailAttach myAnexo..Name = sAnexo myAnexo..Content=fLoadText(sAnexo) myAnexo..ContentType="application/xml" myAnexo..ContentDescription="A XML document" // cria o corpo da mensagem IF EmailStartSession(MySession) = True THEN // Build an email MyMessage is Email MyMessage..Subject = sAssunto MyMessage..Sender = "Brascol" Add(MyMessage..Recipient,sDestino) Add(MyMessage..Attach,myAnexo) MyMessage..Message = sMensagem // envia a mensagem IF NOT EmailSendMessage(MySession,MyMessage) THEN ToastDisplay("Falha ao enviar mensagem.",toastLong,vaMiddle,haCenter,DarkRed) ELSE ToastDisplay("Mensagem enviada com sucesso.",toastShort,vaMiddle,haCenter) END ELSE Error("falha de conexão") END EmailCloseSession(MySession)
Posté le 15 novembre 2017 - 15:43
Hi,

I think it is the use of google. Take a look at that ( settings ).

regards,

Allard
Posté le 15 novembre 2017 - 17:19
to check what is wrong in the error message (Falha ao enviar mensagem) include errorinfo(errfulldetails) or run it in debug and check the error message.
Posté le 15 novembre 2017 - 20:05
try setting the senderaddress parameter to the senders email address and also set the sender parameter to the senders email address, that has helped me with gmail...
Posté le 16 novembre 2017 - 09:29
Hi,

Did you see this post?

http://27130.foren.mysnip.de/read.php…

Kind regards,

Joris
Posté le 16 novembre 2017 - 21:08
Yes. I already see this post. Looks like google change something in gmail but i dont know.


And the EmailConfigure function is not available in WD20. :-(
Posté le 19 novembre 2017 - 16:07
Congratulations PC$OFT !

So, if I want to continue to send messages I need to upgrade to version 22. :sneg:

I'm almost giving up on windev.

Too many bugs and too much expensive.
Posté le 22 novembre 2017 - 21:48
It's not problem of windev, and it's not a bug, google simply changed it's email sending policies for smtp, you need to change the settings of your gmail account from which you are trying to send your email from.
Posté le 22 novembre 2017 - 23:29
Ok. It´s not a windev bug.

But looks like this changes only affect windev because my php and java routines still works fine with gmail.