Re: HTML attachments, plain text body, '550 Administrative prohibition' error wi

Giganews Newsgroups
Subject: Re: HTML attachments, plain text body, '550 Administrative prohibition' error wi
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Mon, 27 Jun 2005

"Michael J. Leaver" <spam@mjleaver.com> wrote in message
news:6643D61327D0E240spam@mjleaver.com...

> Is the following (code fragment) the correct way to send an
> email that has a plain text message body, with one or more
> HTML files as attachments:

No.

> SMTPMsg.ContentType:='text/plain';
> SMTPMsg.Body.Add('blah');

That is wrong.  You must put the plain/text into a TIdText item in the
MessageParts collection.  The ContentType of the message must be
"multipart/mixed" in the example you have provided.

Gambit

Replies

In response to

HTML attachments, plain text body, '550 Administrative prohibition' error with M posted by Michael J. Leaver on Sun, 26 Jun 2005