Ver Mensaje Individual
  #5  
Antiguo 03-11-2005
raulmm26 raulmm26 is offline
Miembro
 
Registrado: feb 2005
Posts: 37
Reputación: 0
raulmm26 Va por buen camino
perdon pero puse mal el tag final

Código Delphi [-]
uses IdSmtp, IdMessage;
 
 procedure TForm1.Button1Click(Sender: TObject);
 begin
   with idMessage do begin
   // <-- [Error] Unit1.pas(30): '.' expected but 'DO' found.
   // Estás usando el nombre de la unidad como nombre del componente u objeto.
   // Cuerpo del mensaje.
   Body.Clear;
   Body.Add('Aqui añades el cuerpo del mensaje');
   // Cuenta Origen.
   From.Text := EMAILORIGEN;
   // Cuenta Destino.
   Recipients.EMailAddresses := EMAILDESTINO;
   // Asunto del email.
   Subject := ASUNTO;
   // Prioridad del mensaje, ALTA.
   Priority := TidMessagePriority(mpHighest);
   // Coloco el archivo adjunto el cual enviar.
   TidAttachment.Create(idMensage.MessageParts,ARCHIVOADJUNTO);
 end;
 with idSMPT do begin
   // Configuro autentificación.
   AuthenticationType := atLogin;
   Username := USERNAME;
   // Nombre del usuario
   Password := PASS; // la password // Configuro el servidor SMTP.
   Host := HOST;
   Port := PUERTO;
   try
     Connect;
     try
       // Envio el mensaje.
       Send(idMenssage);
     finally
       Disconnect;
     end;
     Msg('Enviado Correctamente');
   except
     // Capturo algunas excepciones que pueden ocurrir
     ON E: EIdProtocolReplyError do
     begin
       Msg('No se ha podido enviar el email.' + #13 + 'Incorrecto el email o el usuario o la password.');
     end;
     on E: EFOpenError do
     begin
       Msg('No se ha podido enviar el email.' + #13 + 'Fichero Adjunto desconocido o erróneo.');
     end;
     on E: EIdSocketError do
     begin
       Msg('No se ha podido enviar el email.'+ #13 + 'Host desconocido o incorrecto.');
     end
     else
     begin
       Msg('Fallo en el envio de email');
     end;
   end;
   if connected then Disconnect;
 end;
 
 end.
lo que quiero añadir es para usar el BCC

Última edición por dec fecha: 03-11-2005 a las 10:33:35. Razón: Ajustar el ancho del texto. Editar en lo posible el código fuente del mensaje.
Responder Con Cita