Re: File Attachment in Indy 10 Mail Client demo is not working

Giganews Newsgroups
Subject: Re: File Attachment in Indy 10 Mail Client demo is not working
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Fri, 11 Mar 2005

"Chuck Belanger" <phytote…@lanset.com> wrote in message
news:4231D772.25862F…@lanset.com...

> Used the mail client demo to set everything up, but files were not
> attached, but their MIME encoding (or whatever it is) was embeded
> in the message. The Demo itself did this, too, so I wasn't doing anything
> different. Any tips on how to set this up?

Please elaborate.  What does your actual code look like?

> One person suggested (assuming I understood it) that the
> OnCreateAttachment event needed to be used otherwise the
> attachment is to "message parts."

What are you talking about?  Attachments are always part of the MessageParts
collection.  The OnCreateAttachment event is merely to allow the program to
specify which TIdAttachment descendant class to use for each attachment.

> BTW, where is a list of the ContentTypes and there sub definitions?

MIME types are defined by IANA.  You can find the complete list of
registered types athttp://www.iana.org/assignments/media-types/index.html.

> For instance what is a PDF file that I wish to attach?

application/pdf

Indy automatically fills in the ContentType for you if you do not provide
your own.  The values are takes from the local machine's Registry.  So if
you have the PDF file extension registered on your machine,
'application/pdf' will be assigned as the ContentType automatically.

Gambit

Replies

In response to

File Attachment in Indy 10 Mail Client demo is not working posted by Chuck Belanger on Fri, 11 Mar 2005