This does not seem to compile. Looking at the wiki site, it appears
there needs to be a TMimePart variable declared. But I am not sure how
to link the two variables together.
On Fri, 2007-04-13 at 05:26 +0000, Sasa Zeman wrote:
> > What would be the basic logic to read a binary attachment.
>
> For example:
>
> // To collect subpart list:
> uses
> ...
> mimemess,mimepart;
> var
> Mime: TMimemess; // globally instance class
>
> // Initialize TMimeMess instance globally:
> Mime:=TMimeMess.Create;
>
> // To read body subpart list from specific message stream:
> ...
> begin
>
> Mime.Clear;
> listbox1.Clear;
>
> Mime.Lines.Assign(RAW_Message_Stream);
> Mime.DecodeMessage;
>
> for n:=0 to mime.MessagePart.GetSubPartCount-1 do
> begin
> with mime.MessagePart.GetSubPart(n) do
> begin
> s:=format('%-30s',[primary+'/'+secondary]);
> s:=lowercase(s)+filename;
> end;
> listbox1.items.Add(s);
> end;
> end;
> ....
>
> // To save content of specific body part:
> procedure TForm1.ListBox1Click(Sender: TObject);
> begin
>
> SaveDialog1.FileName:=
> mime.MessagePart.GetSubPart(ListBox1.ItemIndex).FileName;
>
> if SaveDialog1.Execute then
> with mime.MessagePart.GetSubPart(ListBox1.ItemIndex) do
> begin
> TargetCharset:=CharsetCode;
> DecodePart;
> DecodedLines.SaveToFile(SaveDialog1.FileName);
> end;
>
> end;
>
> Sasa
> --
> www.szutils.net
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> synalist-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/synalist-public
--
Terry A Haimann <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public