![]() |
Problema con librerias SSL al enviar email
Hola a todos, estoy desarrollando una App que envia un email a mi cuenta de correo (GMail), y utilize el siguiente codigo:
procedure TForm1.btnConnectClick(Sender: TObject); var SMTP: TIdSMTP; Mail: TIdMessage; begin IdSMTP_SendMail := TIdSMTP.Create(Self); with IdSMTP_SendMail do begin IoHandler:=SSLIOHandler; AuthType := satDefault; Host := 'smtp.gmail.com'; port := 465 ; useTLS:=utUseExplicitTLS; Username := mi_cuenta; Password := mi_password; end; mail := TIdMessage.Create(Self); with mail do begin From.Address := mi_cuenta; Recipients.EMailAddresses := cuenta_del_destinatario; Subject := 'Hola'; body.Text := 'Esto es una prueba'; end; IdSMTP_SendMail.Connect; IdSMTP_SendMail.Send(mail); end; //--------------------------------------------- La App me da la siguiente excepcion: First chance exception at $75244B32. Exception class EIdOSSLCouldNotLoadSSLLibrary with message 'Could not load SSL library.'. Process Project1.exe (3360) He descargado e instalado las siguientes librerias: "libeay32.dll", "libSSL32.dll" y "ssleay32.dll", "MSVCR100.dll" y "VSINIT.dll" Las copie en C:\Windows\SysWOW64 ya que tengo Win8 x64. Uso el Embarcadero RAD Studio 2010 y Indy v10.5.5 Agradeceria mucho su ayuda... 1000 Gracias |
Recuerda poner los tags al código fuente, ejemplo:
![]() Gracias :) |
con tap
|
yn4v4s,
Cita:
El código anterior permite enviar emails usando Gmail como Mail Server por medio de Delphi 7, Indy 9 y openssl096. Quizás funcione correctamente en Delphi 2010 y Indy v10.5.5 Las Dlls Indy openssl096 están disponibles en el link : http://indy.fulgan.com/SSL/Archive/ El código anterior y sus Dlls esta disponible en el link: http://terawiki.clubdelphi.com/Delph...Mail+Gmail.rar Espero sea útil :) Nelson. |
gracias hermano voy a probar
|
funciono perfecto, gracias hermano.
|
No funciona con Indy 10.5.5
Hola, el problema es el siguiente:
El componente IdSSLIOHandlerSocket no existe en Delphi 2010 (Indy 10.5.5) en cambio tube que sustituirlo por un IdSSLIOHandlerSocketOpenSSL en el cual la propiedad AuthenticationType ha cambiado a AuthType y atLogin no se ve por ninguna parte, ahora quedaria de la siguiente manera:
1ero: Al enviar recibo la misma excepcion "Could not load SSL Library", luego de esto me he descargado el archivo openssl-1.0.1e-i386-win32.zip desde http://indy.fulgan.com/SSL/ con lo que ya no me pide dicha libreria, pero ahora el programa se cuelga al enviar. Agradeceria que me ayudaran... |
yn4v4s,
Cita:
Cita:
Nelson. |
La franja horaria es GMT +2. Ahora son las 17:35:41. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi