Article View: borland.public.cppbuilder.internet.socket
Article #253Re: Need help on email from BCB
From: Joe Pasquariello
Date: Wed, 05 Mar 2008 23:35
Date: Wed, 05 Mar 2008 23:35
84 lines
4346 bytes
4346 bytes
Derek, As Remy said, you've got a naming conflict. "Fdi" is not familiar. If you feel like it, send me the CPP and H files for your form and I'll take a look. I think the "ws" files are winsock headers, and I recall that I had some problems like that when I first tried to use Indy. I'll try to review what I did. Joe Derek Harvey wrote: > Thanks Joe. > That could be a good start. > However, I already tried #include <IdSMTP.hpp> in a form and get many errors > of the form > Ambiguity between USHORT and Fdi::USHORT > in files inaddr.h, ws2def.h and wsnwlink.h > > Any idea how I resolve that? What's Fdi? > Derek > "Joe Pasquariello" <joep@fenway.com> wrote in message > news:47cee75d$1@newsgroups.borland.com... >> Derek, >> >> The simplest way to send email with Indy is to use function >> IdSMTP::QuickSend(). The code below is from a little test >> program I wrote for CB2007. No need to put an Indy objects >> on your form. I just put some TEdit objects to allow entering >> the various fields for QuickSend(), use the #include as >> shown below, and call the function. If you need attachments >> or additional features, you'll have to get into Indy in more >> detail. FYI, the version of Indy that is installed with CB2007 >> is fairly old. You will see many recommendations on this group >> to update to the newest snapshot, but there's no documented >> procedure, so it's not very easy to do. If you are doing very >> simple stuff, like this, you may be able to limp along with >> this version, otherwise you'll have to try to piece together >> an update procedure from messages on this group. According to >> David of Codegear, the next release of CB will include an >> up-to-date and relatively bug-free version of Indy. >> >> Joe >> >> >> #include <IdSMTP.hpp> // IdSMTP::QuickSend() >> >> AnsiString Host = HostEdit->Text; >> AnsiString Subject = SubjectEdit->Text; >> AnsiString To = ToEdit->Text; >> AnsiString From = FromEdit->Text; >> AnsiString Body = BodyMemo->Text; >> >> // Note that some (static?) INDY functions require an additional (first) >> // argument as used below when called from C++Builder. Note also that >> // QuickSend() function does not require a pre-existing TIdSMTP object. >> TIdSMTP::QuickSend( __classid(TIdSMTP), Host, Subject, To, From, Body ); >> >> >> >> Derek Harvey wrote: >>> Hi Folks, >>> I want to add a simple emailer to my program but am finding it hard to >>> find a way into the facilities BCB2007 might offer towards this aim, >>> e.g., what components do I use and how. This is so important these days >>> that I am surprised there are no samples of such things provided with the >>> project. Later I will want FTP. >>> >>> In the Help there is a vast collection of items for TIdSMTP, etc. but no >>> easy way into this morass of information. >>> >>> Does anyone know of a sample program I can build on? >>> >>> In BCB6 there were some components in a group FastNet which seemed quite >>> easy to use but I don't find them in BCB2007. What would happen if I >>> moved a small FTP program I wrote as an experiment into 2007? Well, I >>> could try, I suppose. >>> >>> Anby help welcomed. >>> TIA >>> Derek > >
Technical Details
Message-ID:
<47cf2e2b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47cea1cb$1@newsgroups.borland.com> <47cee75d$1@newsgroups.borland.com> <47cf05c3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a96ad1efe07bc68c X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 05 Mar 2008 15:35:26 -0800 From: Joe Pasquariello <joep@fenway.com> User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Need help on email from BCB References: <47cea1cb$1@newsgroups.borland.com> <47cee75d$1@newsgroups.borland.com> <47cf05c3$1@newsgroups.borland.com> In-Reply-To: <47cf05c3$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 76.191.143.61 Message-ID: <47cf2e2b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204760107 76.191.143.61 (5 Mar 2008 15:35:07 -0700) Lines: 84 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail