|Subject:||Re: Attachment ContentType|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Tue, 15 Mar 2005|
"Robert Tulloch" <tulta…@attglobal.net> wrote in message
> When I attach a pdf and an rtf using
> I get:
As well you should. You did not set the ContentType for the attachments.
> Why using NS I get:
Because Netscape knows what the actual ContentType for a pdf file is so it
can fill it in. You have to do the same in your own code. Indy has a
GetMIMETypeFromFile() function that can do that for you, ie:
with TIdAttachment.Create(IdMsgSend.MessageParts, OpenDialog.FileName)
ContentType := GetMIMETypeFromFile(OpenDialog.FileName);
// set other properties as needed...
Attachment ContentType posted by Robert Tulloch on Tue, 15 Mar 2005