Re: email attach/detach

Giganews Newsgroups
Subject: Re: email attach/detach
Posted by:  Patman (Pat.Fle…@Finnforest.com)
Date: Fri, 2 Sep 2005

procedure TfmArrangeDel.SendMail;
var MyAttachmentFile : TIDAttachmentFile; // This might be better declared
in UserSession //
begin
    idMessagePlainText.Recipients.Clear;
    idMessagePlainText.CCList.Clear;
    idMessagePlainText.BccList.Clear;
    idMessagePlainText.Subject := 'Mail Attachment Demo';
    idMessagePlainText.From.Address                := 'aaaa…@bbbbb.com';
    idMessagePlainText.Recipients.Add.Address := 'aaaa…@bbbbb.com';
    idMessagePlainText.CCList.Add.Address    := 'aaaa…@bbbbb.com';
    Screen.Cursor := crHourGlass;
    try
          MyAttachmentFile := TIDAttachmentFile.Create
(idMessagePlainText.MessageParts,'Attachment.Txt');
            idSMTPClient.Send(idMessagePlainText);
            end;
      finally
        Screen.Cursor := crDefault;
      end;
end; // SendMail //

Hope that helps.

"Crazy Horse's crazier little brother"
<cshannonKeinSpamBitteMitZuckerDra…@d4sw.com> wrote in message
news:0C14776FAFD0E240cshannonKeinSpamBitteMitZuckerDra…@d4sw.com...
>I use the TidSMTP and TidMessage components to send email. Does anybody
>have any examples for adding attachments to email messages, and then
>programmatically downloading those attachments on the other end?
>
> --
>
> Download Blackbird Crow Raven's book
> "STILL CASTING SHADOWS: Two American Families 1620-2006"
> (.exe and .pdf):http://cc.borland.com/ccweb.exe/listing?id=23106

Replies

None

In response to

email attach/detach posted by Crazy Horse's crazier little brother on Thu, 30 Jun 2005