Ver Mensaje Individual
  #3  
Antiguo 13-03-2013
yn4v4s yn4v4s is offline
Miembro
NULL
 
Registrado: may 2012
Posts: 33
Reputación: 0
yn4v4s Va por buen camino
con tap

Código Delphi [-]
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;
Responder Con Cita