Hello!
Using the latest snapshot of Indy tiburon on D2010. A very simple project like:
var
stream: TFileStream; (s is TidSMTP and m is TidMessage)
begin
s.Connect;
Stream := TFileStream.Create('c:\Test.zip', fmOpenRead or fmShareExclusive);
try
with TIdAttachmentMemory.Create(m.MessageParts, Stream) do
begin
ContentType := 'application/x-zip-compressed';
Name := ExtractFilePath('C:\'); //'
FileName := 'Test.zip';
end;
finally
FreeAndNil(Stream);
end;
s.Send(m);
s.Disconnect();
end;
Everything works Ok in Outlook, The bat!, OE, yahoo, etc... but in Thunderbird the attachment is not shown. Looking at the source of the message in Thunderbird, the attachment is there. The only difference I can find between messages send by indy and other clients is that Indy messages have this order:
Content-Type: multipart/mixed; boundary="Z\=_7oeC98yIhktvxiwiDTVyhv9R9gwkwT1"
MIME-Version: 1.0
while any other clients have the order:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Z\=_7oeC98yIhktvxiwiDTVyhv9R9gwkwT1"
Don't know if THAT is the source of the problem, but if so: is this a bug on Thunderbird or is this a problem with indy which "malforms" the headers of the messages? Is this order a problem? Does that matter anyway?