8
I need help emailing by Gmail using the Indy10 and Delphi 7. I think the Delphi version shouldn’t matter so much, but the right Indy version?
I slowly lowered the Indy10 down Indy.fulgan.com/ZIP/ and installed the components.
As Dll s I got from indy_openssl096.zip package inside the SSL.zip, in that directory. And I’m getting the following mistake:
Raised Exception class Eidosslcouldnotloadssllibrary with message 'Could not load SSL library.'
Now, when downloading the version openssl-1.0.0l-i386-Win32, in Indy.fulgan.com/SSL/ step to have the following error:
'RCPT first. d8sm5855899vek.11 - gsmtp'.
I am following the following example of Marco Cantu marcocantu.com/tips/oct06_gmail.
That is to say:
DFM of the components:
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
Shipping 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, after all, what am I doing wrong?
I think I’ve tried that example, but I’ll test..
– user3628
Oops, I was kind of busy, but I’m gonna test it now. But at first, this one
IdSSLIOHandlerSocketno longer has in Indy 10. What I have here is theIdSSLIOHandlerSocketOpenSSL. I’ll see if I can do it like this..– user3628
Strange.. I already changed the options of the Usetsl property of the component
IdSMTP. I tried with theIdSSLIOHandlerSocketOpenSSLwith host and port information and without that information.. but is always locking in the methodConnect. TheAuthTypeI had to leave assatDefault.SSLOptions.MethodandModeI left with the example, but did not give also.– user3628
I’ll raise another VM with Delphi7 and Indy9 to see if this example will.. but I still think I’ve tried this one already.
– user3628
I use 7 with Indy 9, and here it worked right
– Beto Zanette
Voted e +1. I did with the Indy 10 even following the same example I was doing. Oddly enough, I was forgetting to inform the property
Recipient. Dear God!!! And thank you so much for your help!– user3628