mail2000确实有问题
我改了 一部分 还没改完
不过现在 可以看到 多个附件了
procedure TMailPart.LoadFromFile(FileName: string);
var
ms: TMemoryStream;
Buffer: PChar;
len: integer;
c_end: char;
begin
ms := TMemoryStream.Create;
ms.LoadFromFile(FileName);
len := ms.Size;
ms.Seek(0, soFromEnd);
c_end := #0;
ms.Write(c_end, 1);
ms.Position := 0;
Buffer := ms.Memory;
Fill(Buffer, True, len);
FreeAndNil(ms);
end;
procedure TMailPart.Fill(Data: PChar;
HasHeader: Boolean;
len: integer = 0);
const CRLF: array[0..2] of Char =(#13,#10,#0);
var
Loop: Integer;
BoundStart: array[0..99] of Char;
BoundEnd: array[0..99] of Char;
InBound: Boolean;
IsBoundStart: Boolean;
IsBoundEnd: Boolean;
BoundStartLen: Integer;
BoundEndLen: Integer;
PartText: PChar;
DataEnd: Boolean;
MultPart: Boolean;
NoParts: Boolean;
InUUCode: Boolean;
UUFile, UUBound: string;
Part: TMailPart;
nPos: Integer;
nLen: Integer;
nTL: Integer;
nSPos: Integer;
Line: PChar;
SChar: Char;
begin
if (FOwnerMessage = nil) or (not (FOwnerMessage is TMailMessage2000)) then
begin
Exception.CreateFmt(_E_MLPT, [Self.Name]);
Exit;
end;
for Loop := 0 to FSubPartList.Count - 1do
FSubPartList.Items[Loop].Destroy;
FHeader.Clear;
FBody.Clear;
FDecoded.Clear;
FSubPartList.Clear;
FIsDecoded := False;
FEmbedded := False;
FOwnerMessage.FNeedRebuild := True;
FOwnerMessage.FNeedNormalize := True;
FOwnerMessage.FNeedFindParts := True;
nPos := -1;
DataEnd := False;
if len <= 0 then
nTL := StrLen(Data)
else
nTL := len;