Re: Cannot create attachment object

Giganews Newsgroups
Subject: Re: Cannot create attachment object
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Thu, 5 May 2005

"Man Utd" <NOalanpltseSP…@yahoo.com.au> wrote in message
news:75B1B871B9C9E240NOalanpltseSP…@yahoo.com.au...

> I tried to create an attachment object with the following code:

I already told you earlier that you are not creating the attachment
correctly.  You need to change this line:

    attachment.Create(mailMessage.MessageParts, 'mydoc.doc');

To this instead:

    attachment := TIdAttachment.Create(mailMessage.MessageParts,
'mydoc.doc');

Gambit

Replies

In response to

Cannot create attachment object posted by Man Utd on Fri, 6 May 2005