Article View: borland.public.cppbuilder.internet.socket
Article #2932Re: Send Html Email with Indy component doesn't work
From: Francesco
Date: Fri, 23 Dec 2005 06:44
Date: Fri, 23 Dec 2005 06:44
66 lines
2749 bytes
2749 bytes
Hi Remy,
thank you for the advise but I've an error,
[C++ Error] Main.cpp(180): E2316 'ContentID' is not a member of
'TIdAttachment'
[C++ Error] Main.cpp(186): E2316 'ContentID' is not a member of
'TIdAttachment'
[C++ Error] Main.cpp(192): E2316 'ContentID' is not a member of
'TIdAttachment'
There is no property ContentID in class TIdAttachment, that's why I
was using ExtraHeaders->Values["Content-ID"] = ...
Francesco
Remy Lebeau (TeamB) wrote:
>
> <Francesco> wrote in message news:43aac389@newsgroups.borland.com...
>
> > I want to send a html mail using SMTP of Indy 9, when
> > i receive the mail i see the attaches but the mail is empty
>
> Try this instead:
>
> MailMessage->From->Address = "mail@mail.com";
> MailMessage->From->Name = "sender";
> MailMessage->Recipients->EMailAddresses = "info@mail.com";
> MailMessage->ContentType = "multipart/related;
> type=\"text/html\"";
>
> TIdText *HTML = new TIdText(MainMessage->MessageParts, NULL);
> HTML->Body->LoadFromFile("c:\\mail.htm");
> HTML->ContentType = "text/html";
>
> TIdAttachment *IImagePart = new
> TIdAttachment(MailMessage->MessageParts, "c:\\content.gif");
> IImagePart->ContentID = "content.gif";
> IImagePart->ContentType = "image/gif";
> IImagePart->FileName = "content.gif";
>
> TIdAttachment *IImagePart2 = new
> TIdAttachment(MailMessage->MessageParts, "c:\\down.gif");
> IImagePart2->ContentID = "down.gif";
> IImagePart2->ContentType = "image/gif";
> IImagePart2->FileName = "down.gif";
>
> TIdAttachment *IImagePart3 = new
> TIdAttachment(MailMessage->MessageParts, "c:\\topaug.gif");
> IImagePart3->ContentID = "topaug.gif";
> IImagePart3->ContentType = "image/gif";
> IImagePart3->FileName = "topaug.gif";
>
>
> Gambit
--
Technical Details
Message-ID:
<43abaac3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43aac389@newsgroups.borland.com> <43aaf78e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9d6c4b1081b0b15 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Francesco" <> Subject: Re: Send Html Email with Indy component doesn't work Newsgroups: borland.public.cppbuilder.internet.socket References: <43aac389@newsgroups.borland.com> <43aaf78e$1@newsgroups.borland.com> User-Agent: XanaNews/1.17.6.6 NNTP-Posting-Host: 217.172.212.72 Message-ID: <43abaac3@newsgroups.borland.com> Date: 22 Dec 2005 23:44:03 -0700 X-Trace: newsgroups.borland.com 1135323843 217.172.212.72 (22 Dec 2005 23:44:03 -0700) Lines: 67 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail