Article View: borland.public.cppbuilder.internet.socket
Article #2115Re: How to send an attachment to an e-mail
From: David Ayre
Date: Fri, 18 Aug 2006 08:27
Date: Fri, 18 Aug 2006 08:27
52 lines
2482 bytes
2482 bytes
Thanks Remy,
I think that explains everything now.
It may be me, but I find it difficult to get what I want from
the Indy help files. I'm sure all the info is there when you
know the answers, but it is very difficult to find out what
you have to do when you don't know how it works in the first
place.
I find your explanations very helpful and I thank you for that.
All the best,
David
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>"David Ayre" <davidcayre@ntlworld.com> wrote in message
>news:44e4a6a5$1@newsgroups.borland.com...
>
>> IdSMTP1->Connect(1000);
>> IdSMTP1->Send(IdMessage1);
>>
>> if(IdSMTP1->Connected())IdSMTP1->Disconnect();
>
>Wrap that in a try..finally block instead:
>
> IdSMTP1->Connect(1000);
> try {
> IdSMTP1->Send(IdMessage1);
> }
> __finally {
> IdSMTP1->Disconnect();
> }
>
>> If I use the Text->Body->Text = acBody; as above, no
>> body text appears in the body of the e-mail.
>
>You did not set the TIdMessage::ContentType property so that the receiver
>would know the formatting of the message:
>
> IdMessage1->ContentType = "multipart/mixed";
>
>Also, older versions of Indy require a minimum of *2* TIdText parts - one
>for plain text and one for html.
>
>
>Gambit
>
>
Technical Details
Message-ID:
<44e579fc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44e2059a$1@newsgroups.borland.com> <44e213f5$1@newsgroups.borland.com> <44e2178f$1@newsgroups.borland.com> <44e2793f$1@newsgroups.borland.com> <44e2da4d$1@newsgroups.borland.com> <44e34fc7@newsgroups.borland.com> <44e48ddd$1@newsgroups.borland.com> <44e49c50$3@newsgroups.borland.com> <44e4a6a5$1@newsgroups.borland.com> <44e4c67d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f90837efd85511de X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "David Ayre" <davidcayre@ntlworld.com> Sender: "David Ayre" <davidcayre@ntlworld.com> Reply-To: "David Ayre" <davidcayre@ntlworld.com> Subject: Re: How to send an attachment to an e-mail Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 62.252.224.18 X-Forwarded-For: 81.96.132.239 References: <44e2059a$1@newsgroups.borland.com> <44e213f5$1@newsgroups.borland.com> <44e2178f$1@newsgroups.borland.com> <44e2793f$1@newsgroups.borland.com> <44e2da4d$1@newsgroups.borland.com> <44e34fc7@newsgroups.borland.com> <44e48ddd$1@newsgroups.borland.com> <44e49c50$3@newsgroups.borland.com> <44e4a6a5$1@newsgroups.borland.com> <44e4c67d$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <44e579fc$1@newsgroups.borland.com> Date: 18 Aug 2006 01:27:40 -0700 X-Trace: newsgroups.borland.com 1155889660 207.105.83.66 (18 Aug 2006 01:27:40 -0700) Lines: 53 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail