Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #35  
Antiguo 11-07-2007
CORBATIN CORBATIN is offline
Miembro
 
Registrado: may 2003
Ubicación: España
Posts: 131
Poder: 21
CORBATIN Va por buen camino
Aquí tengo lo que he formado pero me da un error y es el siguiente.
Cuando le doy a enviar la primera vez sale todo perfecto, pero si cambio la dirección de correo para enviarselo a otro, entonces me sale el error de EidProtocolReplyError 553 RCPT REFUSED.

Aquí tienen el codigo
Código Delphi [-]
procedure EnviarHtml(aText: String;ruta,destino:string;aImagenes:array of string);
var
  idAttach: TidAttachment;
  idText1: TidText;
  idText2: TidText;
  p: TidMessageParts;
  idMessage1: TidMessage;
  slBody: TStringList;
  idSMTP1: TidSMTP;
  x:integer;
begin
  idMessage1 := TIdMessage.create(nil);
  idMessage1.Recipients.Add;
  idMessage1.Recipients[0].Address := destino;
  idMessage1.subject := 'OFERTAS';
  //idMessage1.from.Text := 'PACO J GARCIA.';

  p := idMessage1.MessageParts;
  slBody := TstringList.Create;
 try
  try
   idSMTP1 := TidSMTP.create(nil);
   idSMTP1.AuthenticationType :=atLogin;
   idSMTP1.Port := 25;
   idSMTP1.Host := 'smtp.ono.com';
   idSMTP1.UserId :='upimolina@ono.com';
   idSMTP1.Password := 'OLIMPICO';
    // you can actually load the body from a RichEdit with
    // slBody.Text := RichEdit1.LinesText;
    slBody.Add(atext);
    idText1 := TidText.Create(p, slBody);
    idText1.ContentType := 'text/html';
    idText2 := TidText.Create(p);
    idText2.ContentType := 'text/plain';
    idText2.Body.Text := '';
    // This shows how to add an attachment
    for x := 0 to 3 do
    begin
     if (length(aImagenes[x]) > 0) then
     begin
      idAttach := TidAttachment.Create(p, ruta+aImagenes[x]);
      idAttach.ContentType := 'image/jpeg';
      idAttach.ContentDisposition := 'inline';
      idAttach.ExtraHeaders.Values['content-id'] := aImagenes[x];
      idMessage1.Body.Assign(slBody);
      idAttach.DisplayName := aImagenes[x];
      idMessage1.ContentType := 'multipart/mixed';
     end;
    end;
    idSMTP1.Connect;
    idSMTP1.Send(idMessage1);
  finally
    idSMTP1.Disconnect;
    idMessage1.Free;
    slBody.Free;
    Showmessage('enviado');
  end;
 except
  showmessage('Error al enviar el e-mail, consulte con su administrador.');
 end;
end;

Haber si alguién me puede decir a que se debe ese motivo y tener en cuenta que todavía lo estoy depurando, gracias.
__________________
No hay vientos favorables para quién no conoce su rumbo.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 15:45:17.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi