Board index » delphi » Sending HTML e-mails using Indy

Sending HTML e-mails using Indy

Before I get too deep into changing over to using Indy, how do I send an
HTML formatted e-mail using the Indy components?  I don't see a way to tell
it that the e-mail is HTML formatted, so I'm sure it'll send a text message
with all the HTML tags visible.

Thanks,
Jesse
www.davinci-mims.com

 

Re:Sending HTML e-mails using Indy


Quote
Anchorman wrote:
> I don't see a way to tell it that the e-mail is HTML formatted

Set it's content-type to "text/html" instead of "text/plain".

--
Markku Uttula

URL: http://www.disconova.com/utu/  "Are you hot? Or at least cute?"
MAIL: markku.utt...@disconova.com   "If not, are you at least easy?"

Re:Sending HTML e-mails using Indy


Quote
"Anchorman" <JesseN0S...@davinci-mims.com> wrote:
> Before I get too deep into changing over to using Indy, how do I send
> an HTML formatted e-mail using the Indy components?  I don't see a way
> to tell it that the e-mail is HTML formatted, so I'm sure it'll send a
> text message with all the HTML tags visible.

you must tell indy that the message type is "text/html" rather than
"text/plain".

This usually requires the use of a MIME-type of message (instead of a plain
text message)

--
Ben

We Aquariuses do not believe in Zodiac signs.

Re:Sending HTML e-mails using Indy


Quote
"Anchorman" <JesseN0S...@davinci-mims.com> wrote in message

news:3e3aaaf1$1@newsgroups.borland.com...

Quote
> how do I send an
> HTML formatted e-mail using the Indy components?

Jesse:

It can be as simple as setting the ContentType andf Body of the message:

    IdMessage.ContentType := 'text/html';
    IdMessage.Body.Text := sHtmlTaggedContent;

If you want attachments, or inline images, it's more invloved.  Use Google
Groups to see dome of these posts:

http://groups.google.com/groups?q=Indy+HTML+message+multipart

hth...

--
Don

Join the Indy Docs project! (http://www.indyproject.org/teams/docs)

ELKNews - Get your free copy at http://www.atozedsoftware.com

Re:Sending HTML e-mails using Indy


I have a great example piece of code I wrote.  If you email me
directly at V...@VernSix.com, I will send you the entire project
(which is VERY small)

On Fri, 31 Jan 2003 11:58:01 -0500, "Anchorman"

Quote
<JesseN0S...@davinci-mims.com> wrote:
>Before I get too deep into changing over to using Indy, how do I send an
>HTML formatted e-mail using the Indy components?  I don't see a way to tell
>it that the e-mail is HTML formatted, so I'm sure it'll send a text message
>with all the HTML tags visible.

>Thanks,
>Jesse
>www.davinci-mims.com

----------------
Send a note to a soldier...
share your pride and let them know you care!

http://www.SoldierGram.us

Other Threads