Ahora he cambiado el puerto a 465 y me envia el siguiente error:
Cita:
Proyect abc.exe raised exception class EIdConnClosedGracefully with message 'Connection Closed Gracefully'. Process stopped...
|
El codigo:
Código Delphi
[-]
procedure TfrmImpEnvioTCK.btnEnviarClick(Sender: TObject);
begin
idMessage1.Body.Clear();
idMessage1.Recipients.Clear();
idMessage1.Subject:='ENVIO TICKET';
idMessage1.Body.AddStrings(Memo1.Lines);
idMessage1.Recipients.EMailAddresses:=edMail.Text;
idMessage1.From.Address:='micorreo@gmail.com';
idMessage1.From.Name:='LAVANDERIA';
with idSMTP1 do
begin
Port:=465;
Host:='smtp.gmail.com';
AuthenticationType := atLogin;
Username:=micorreo@gmail.com';
Password := 'kadjkfljldjflkad';
Connect();
btnEnviar.Enabled := false;
try
Send(IdMessage1);
ShowMessage('Correo enviado con éxito');
except
on E : Exception do
if E is EIdConnClosedGracefully then
begin
btnEnviar.Enabled := true;
Disconnect;
end else
begin
raise
end;
end;
end;
end;
Alguna idea??...
O definitivamente deberé desinstalar la 9 e instalar la 10 de Indy???...