Enviar email retorna o erro: Error connecting with SSL. Error connecting with SSL. error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number.
19/05/2011
0
Estou com um problema, estou fazendo uma aplicação para envio de e-mails para posteriormente acopla-la a minha aplicação principal. Porem na hora que q envio está me retornando o seguinte erro:
Error connecting with SSL. Error connecting with SSL. error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number.
Não sei o q está acontecendo. Poderiam me ajudar?
Estou fazendo uma conexão pelo hotmail. Porta 25
Segue o cod do envio:
if chk1.Checked then begin IdSSLIOHandlerSocketOpenSSL1.DefaultPort := StrToInt(edt10.Text); IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv3; IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Mode := sslmClient; end; with IdSMTP do begin IOHandler := IdSSLIOHandlerSocketOpenSSL1; UseTLS := utUseImplicitTLS; AuthType := satDefault; Host := edt8.Text; Username := edt5.Text; Password := medt1.Text; Port := StrToInt(edt10.Text); end;
with idmsg1 do begin Recipients.Clear; Body.Clear; Recipients.Add.Address := edt1.Text; From.Name := 'Marcelo' ; From.Address := edt1.Text; Subject := edt4.Text ; Date := Date ; MessageParts.Clear; ContentType := 'text/html'; // Texto em HTML Body.Assign(mmo1.Lines); IdSMTP.Connect; if IdSMTP.Connected then IdSMTP.Send(idmsg1) else ShowMessage('erro ao conectar'); IdSMTP.Disconnect; Sleep(StrToInt(edt6.Text) * 1000); IdSMTP.Disconnect; end;
Obrigado desde já.
Marcelo Letteri
Post mais votado
19/05/2011
Espero que sej util para alguém.
Podem dar este tópico como encerrado!
Marcelo Letteri
Mais Posts
21/11/2012
Ricardo Alves
24/11/2012
Singular Ti
https://www.devmedia.com.br/forum/porta-de-conexao-para-envio-de-emails/426011
Percebi que vc utiliza conexao do tipo SSL/TLS esse tipo de conexao tem algumas particularidades começando pela porta a ser usada... porta 25 nao funciona para esse tipo de conexao.. Outra coisa eu sugiro que voce mude as seguintes instruçoes:
IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvTLSv1; IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Mode := sslmUnassigned; IdSMTP.IOHandler := IdSSLIOHandlerSocket
De uma lida no post que passei para voce... e analize as mudanças que eu sugeri.. Ja tive dor de cabeça com isso tambem.
Qualquer duvida é só postar.
Abraços!!!
09/08/2014
Adriano Wolff
08/04/2015
Wanderson Cardoso
31/05/2016
Afonso Foletto
19/07/2019
Rafael Mattos
</b></span></div><div><span class="Apple-style-span" style="font-family: verdana; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small; "><b>
</b></span></div><div><span class="Apple-style-span" style="font-family: verdana; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small; ">Espero que sej util para alguém.</span></div><div><span class="Apple-style-span" style="font-family: verdana; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small; ">
</span></div><div><span class="Apple-style-span" style="font-family: verdana; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small; ">Podem dar este tópico como encerrado!</span></div>
Me ajudou com e-mail da sinos.net Delphi Rio 10.3.1 e Indy 10.
Clique aqui para fazer login e interagir na Comunidade :)