perdon pero puse mal el tag final
Código Delphi
[-]
uses IdSmtp, IdMessage;
procedure TForm1.Button1Click(Sender: TObject);
begin
with idMessage do begin
Body.Clear;
Body.Add('Aqui añades el cuerpo del mensaje');
From.Text := EMAILORIGEN;
Recipients.EMailAddresses := EMAILDESTINO;
Subject := ASUNTO;
Priority := TidMessagePriority(mpHighest);
TidAttachment.Create(idMensage.MessageParts,ARCHIVOADJUNTO);
end;
with idSMPT do begin
AuthenticationType := atLogin;
Username := USERNAME;
Password := PASS; Host := HOST;
Port := PUERTO;
try
Connect;
try
Send(idMenssage);
finally
Disconnect;
end;
Msg('Enviado Correctamente');
except
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