Tema: coreo indy
Ver Mensaje Individual
  #1  
Antiguo 03-03-2008
yhoho yhoho is offline
Miembro
 
Registrado: may 2004
Posts: 58
Reputación: 20
yhoho Va por buen camino
coreo indy

Tengo el siguietne codigo:
Código Delphi [-]
smtp : TIdSMTP;
MMsg : TIdMessage;
begin
    Try
        SMTP := TIdSMTP.cReate(nil);
       // SMTP.ReadTimeout:=10000;
        MMsg:=TIdMessage.Create(nil);
    Except
      on E : Exception DO
        begin
          showmessage('Error seding message:'+ E.Message);
          exit;
         end;
    end;
    MMsg.Clear;
    MMsg.Sender.Address:='r@tal.es';
    MMsg.from.Address:='r@tal.es';
    MMsg.Recipients.EMailAddresses:='r@tal.es';
    MMsg.Subject:='Un titulo';
    MMsg.Body.Add('Algun texto');
    MMsg.Body.Add('Algun texto mas');
    SMTP.Host:='smtp.tal.es';
    SMTP.Username:='r';
    SMTP.Password:='pass';
    Try
      SMTP.Connect;
      SMTP.Send(MMsg);
      SMTP.Disconnect;
    Except
      On E : Exception Do
        begin
          showmessage('Error sending message:'+E.Message);
        end;
     end;
SMTP.free;
MMsg.Free;
En la linea en rojo me da un error y no se porque:

class eidsocketerror with message 'socket error'#1004 process stoping.

Ese codgio me lo dejaron para enviar correo, agradeceria mucho si alguien pudiera saber a que es debido ese error porque no tengo ni idea nadie nunca me ha esplicado los indy y no se....
Responder Con Cita