source: trunk/Packages/synapse/source/demo/FreePascal/testmime.pas

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 616 bytes
Line 
1{$MODE DELPHI}
2
3Program testmime;
4
5uses
6 mimepart, classes;
7
8type
9 Tc = class(TObject)
10 public
11 class procedure ph(const Sender: TMimePart);
12 end;
13
14class procedure Tc.ph(const Sender: TMimePart);
15begin
16 Sender.DecodePart;
17 Sender.EncodePart;
18end;
19
20var
21 l: tstringlist;
22 m:tmimepart;
23begin
24 l := TStringList.create;
25 m := tmimepart.create;
26 try
27 m.OnWalkPart:=tc.ph;
28 m.Lines.LoadFromFile(paramstr(1));
29 m.DecomposeParts;
30 m.WalkPart;
31 m.ComposeParts;
32 m.Lines.SaveToFile(paramstr(1) + '.repack');
33 finally
34 m.free;
35 l.free;
36 end;
37end.
38
Note: See TracBrowser for help on using the repository browser.