Ver Mensaje Individual
  #1  
Antiguo 29-10-2010
rackzo rackzo is offline
Registrado
NULL
 
Registrado: oct 2010
Posts: 2
Reputación: 0
rackzo Va por buen camino
tengo un problema con ServidorSMTP.Connect(10000);

me muetra un error dice ke no hacepta tantos enteros este es el codigo ke utilizo haber si alguien me puede ayudar estoy utilizando delphi 6

procedure TForm1.Button1Click(Sender: TObject);
var ServidorSMTP:TIdSMTP;
var Mailmessage:TIdMessage;
begin
ServidorSMTP:=TIdSMTP.Create(Self);
Mailmessage:=TIdMessage.Create(Self);
with Mailmessage do
begin
Subject:='Prueba?';
Body.Text:='hola soy DELPHI';
from.Address:='correo@gmail.com';
Recipients.EMailAddresses:='correo@gmail.com';
end;
try
ServidorSMTP.Host:='smtp.gmail.com';
ServidorSMTP.Port:=587;
ServidorSMTP.AuthenticationType:=atLogin;
ServidorSMTP.UserId:=correo@gmail.com';
ServidorSMTP.Password:='pasword del correo';
ServidorSMTP.Connect(10000);
try
ServidorSMTP.Send(Mailmessage);
except
on E: Exception do
ShowMessage('Falla al enviar:'+E.Message);
end;
finally
ServidorSMTP.Disconnect;
ServidorSMTP.Free;
Mailmessage.Free;
end;
close;
end;
Responder Con Cita