I need help with emailing GMail using Indy10 and Delphi 7 . I think the Delphi version should not matter so much, but the Indy version right?
I just downloaded Indy10 for indy.fulgan.com/ZIP/ and I've already installed the components.
The Dll's I got from the indy_openssl096.zip package that has SSL.zip in that directory. And I'm getting the following error:
raised exception class EIdOSSLCouldNotLoadSSLLibrary with message 'Could not load SSL library.'
Now when you download the openssl-1.0.0l-i386-win32 version, indy.fulgan. with / SSL / I get the following error:
'RCPT first. d8sm5855899vek.11 - gsmtp '.
I'm following the following example of Marco Cantu marcocantu.com/tips/oct06_gmail .
That is:
Components DFM:
object IdMsg: TIdSMTP
OnStatus = IdSMTP1Status
IOHandler = IdSSLSocket
Host = 'smtp.gmail.com'
Port = 587
SASLMechanisms = <>
UseTLS = utUseExplicitTLS
Username = '****@gmail.com'
Password = '****'
end
object IdSSLSocket: TIdSSLIOHandlerSocketOpenSSL
Destination = 'smtp.gmail.com:587'
Host = 'smtp.gmail.com'
MaxLineAction = maException
Port = 587
SSLOptions.Method = sslvTLSv1
SSLOptions.Mode = sslmUnassigned
SSLOptions.VerifyMode = []
SSLOptions.VerifyDepth = 0
OnStatusInfo = IdSSLSocketStatusInfo
end
Upload method:
procedure TMainForm.enviarButtonClick(Sender: TObject);
begin
IdMsg.Clear;
IdMsg.ClearBody;
IdMsg.ClearHeader;
IdMsg.From.Address := '****@gmail.com';
IdMsg.From.Name := 'NOME';
IdMsg.Body.Text := 'Data/Hora: ' + DateTimeToStr(Now);
IdMsg.Body.Add('Teste');
IdSmtp.Connect();
IdSmtp.Send(IdMsg);
IdSmtp.Disconnect;
end;
So, what am I doing wrong after all?