Ver Mensaje Individual
  #3  
Antiguo 03-11-2005
raulmm26 raulmm26 is offline
Miembro
 
Registrado: feb 2005
Posts: 37
Reputación: 0
raulmm26 Va por buen camino
utilizo componenes indy con d7,y el codigo que utilizo es este
[delphi]
uses IdSmtp, IdMessage, procedure TForm1.Button1Click(Sender: TObject);beginwith 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;endend.[\delphi]
lo que quiero es añadirle el BCC gracias
Responder Con Cita