Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TIdSMTP with gmail

145 views
Skip to first unread message

Blake Young

unread,
Oct 24, 2005, 2:36:56 PM10/24/05
to
I am having some difficulty getting SMTP to work with Gmail. I know that
this can be done, because I used to have my Outlook client configured to
send and receive Gmail (via STMP and POP3), and the server/port/options to
make such a connection are listed on the Gmail help pages. However, I
cannot get the connection to work in my program. Prior to this my program
worked fine because I used another SMTP server, but it has since been
disconnected so I need to use Gmail. Here is the code:

SMTPClient->AuthenticationType = atLogin;
SMTPClient->Host = "smtp.gmail.com";
SMTPClient->Password = <PASSWORD>
SMTPClient->Port = 465;
SMTPClient->UserId = "young...@gmail.com";
SMTPClient->Connect();
SMTPClient->Send(EmailMessage);
SMTPClient->Disconnect();

The problem is that the program just hangs on the Connect() line
indefinitely. While hanging, however, I ran netstat and saw that a
connection to the smtp.gmail.com server was made. I tried adding the Send()
command to the OnConnected event handler, and this handler method WAS
executed, but then the program hung AGAIN on the Send() command. When I was
using my previous SMTP server, I did not need the OnConnected handler. The
Connect() method would return after a connection was made, and everything
would follow sequentially.


Blake Young

unread,
Oct 24, 2005, 2:39:18 PM10/24/05
to
Any chance we can get a moderator to edit/remove or put a placeholder for my
username/email address? I put it in without thinking.


Hans Galema

unread,
Oct 24, 2005, 4:05:41 PM10/24/05
to
Blake Young wrote:
> Any chance we can get a moderator to edit/remove or put a placeholder for my
> username/email address? I put it in without thinking.

With your emailreader you can delete the message.

Then change and post again.

Hans.

Remy Lebeau (TeamB)

unread,
Oct 24, 2005, 7:03:43 PM10/24/05
to

"Hans Galema" <not...@notused.nl> wrote in message
news:435d3e26$1...@newsgroups.borland.com...

> With your emailreader you can delete the message.

Users do not have access to delete messages from this newsserver.


Gambit


Remy Lebeau (TeamB)

unread,
Oct 24, 2005, 7:04:45 PM10/24/05
to

"Blake Young" <nos...@nospam.com> wrote in message
news:435d2919$1...@newsgroups.borland.com...

> I am having some difficulty getting SMTP to work with Gmail.

GMail requires SSL. Did you attach an SSL-enabled IOHandler to TIdSMTP
before connecting?


Gambit


Hans Galema

unread,
Oct 24, 2005, 7:36:15 PM10/24/05
to

They do. To demonstrate this I just removed the post where
you replied to.

Hans.

Jonathan Benedicto

unread,
Oct 24, 2005, 7:33:40 PM10/24/05
to
Remy Lebeau (TeamB) wrote:
> Users do not have access to delete messages from this newsserver.

Can we cancel our messages though ?

Jonathan


Message has been deleted

Blake Young

unread,
Oct 24, 2005, 7:46:04 PM10/24/05
to
> GMail requires SSL. Did you attach an SSL-enabled IOHandler to TIdSMTP
> before connecting?

I am guessing this means I'll need Indy 10. I tried installing it at one
point, was it was a total nightmare so I've always tried to get by with Indy
8.


Remy Lebeau (TeamB)

unread,
Oct 24, 2005, 7:59:55 PM10/24/05
to

"Jonathan Benedicto" <inco...@no.server> wrote in message
news:435d...@newsgroups.borland.com...

> Can we cancel our messages though ?

That is the same thing as deleting messages, and no, users do not have
access to do that. Only Borland's admins can remove messages from this
server.


Gambit


Remy Lebeau (TeamB)

unread,
Oct 24, 2005, 8:01:22 PM10/24/05
to

"Blake Young" <nos...@nospam.com> wrote in message
news:435d...@newsgroups.borland.com...

> I am guessing this means I'll need Indy 10.

Indy 9 also supports SSL.

> I tried installing it at one point, was it was a total nightmare
> so I've always tried to get by with Indy 8.

Indy 8 is a very old version that is no longer supported. You should
seriously consider upgrading to Indy 9 at the least.


Gambit


Blake Young

unread,
Oct 24, 2005, 9:22:01 PM10/24/05
to
Ok, so I'm trying to install Indy 10. I have read the instructions on the
Indy website, but please advise. So far, I have done the following:

1) In IDE, go to Component | Install Packages and select the Indy entry in
the Design Packages list and select Remove.
2) Manually search through every single subdirectory of my CBuilder6
directory and remove any and all instances of Indy files.

After having done this, I can start up CBuilder6 with no problems (i.e. no
"can't find indy*.* error) and the Indy entries are removed from the
component palette. Good so far. Now, actually installing Indy 10 is
turning into a pain. First of all, I have downloaded two zip files with
source code. I downloaded a Development Snapshot (indy10.zip) and
indy10.0.52_source.zip. I would prefer installing the latter, since I don't
like messing with possibly buggy dev snapshots. Inside
indy10.0.52_source.zip are the four primary folders, and per the
instructions, I tried to compile System first. The only way I know to do
this is to open BCB, go to File | Open and select IndySystem60.dpk from the
System directory (I was expecting a bpk or bpl file, but there are none).
Once the file is opened, however, I see no option for compiling. For the
heck of it, I tried running the FullC6.bat file from the Dev Snapshot, but I
received an error saying "computil" is an unrecognized command or filename.
This will be the third or fourth time I've tried installing Indy 10, and I
don't want to give up this time. Thanks.


Remy Lebeau (TeamB)

unread,
Oct 24, 2005, 10:49:26 PM10/24/05
to

"Blake Young" <nos...@nospam.com> wrote in message
news:435d8807$1...@newsgroups.borland.com...

> Manually search through every single subdirectory of
> my CBuilder6 directory and remove any and all instances
> of Indy files.

That is not adequate enough. Please read the Knowledge Base more carefully.
There are files stored elsewhere on the machine that would need to be
removed as well.

> actually installing Indy 10 is turning into a pain.

Indy 10 does not officially support BCB6 at this time.

> I would prefer installing the latter, since I don't like messing
> with possibly buggy dev snapshots.

The latter is a very old build that hasn't been updated in over a year. The
snapshot is the best build to get.

> Inside indy10.0.52_source.zip are the four primary folders, and per
> the instructions, I tried to compile System first. The only way I know
> to do this is to open BCB, go to File | Open and select IndySystem60.dpk
> from the System directory (I was expecting a bpk or bpl file, but there
> are none). Once the file is opened, however, I see no option for
compiling.

BCB cannot compile Delphi packages. You will have to use the command-line
Delphi compiler for that. Or else create new BCB-generated packages and
then move the source code over to them.


Gambit


Jonathan Benedicto

unread,
Oct 24, 2005, 10:52:26 PM10/24/05
to
Remy Lebeau (TeamB) wrote:
> That is the same thing as deleting messages, and no, users do not have
> access to do that. Only Borland's admins can remove messages from
> this server.

Oh, ok thank you.

Jonathan


Blake Young

unread,
Oct 25, 2005, 12:40:30 AM10/25/05
to
Getting closer. First, I ran the dcc32 compiler on "computil.dpr" to
generate computil.exe. Then, I ran fullc6.bat and everything appeared to
work. A directory called C6 was created which contained bpl, dcp, and dcu
files. However, I checked before and after running fullc6.bat, and no lib,
hpp, or obj files were created. I tried to just continue normally by
starting the IDE, going to Component | Install package | Add and selecting
dclIndyCore60.bpl. I added the .dcu path to the Library Path, but I didn't
know what to do about the hpp path, since no hpp files were created. To
test it out, I added a antifreeze component and tried to compile, but I
received an error saying "Unable to find static library: IndyCore60.lib"
(this file exists nowhere on my computer). I just clicked Cancel and began
to receive a barrage of "Unable to find package import: IndyCore60"
messages. After finally cancelling enough times, I shut down and restarted
BCB. Upon doing so, I noticed that the Indy components were gone from the
palette. I went back to Component | Install package and noticed that the
Indy entry (Indy 10 Core Design Time) was unchecked. When I tried to check
it, I got an error saying "The application has failed to start because
IndySystem60.bpl was not found" followed by "Can't load package
dclIndyCore60.bpl." The same thing happens if I try to load
dclIndyProtocols60...every time I restart the entries are unchecked and the
error messages pop up when I try to enable them.

Thanks for the help so far...I've never gotten this far before.


Hans Galema

unread,
Oct 25, 2005, 3:44:57 AM10/25/05
to

Huh ?

Everybody can delete/cancel his own messages (using a newsreader).

I did already demonstrate that in this thread.

And I am not a Borland admin.

Hans.

Steve Aletto

unread,
Oct 25, 2005, 10:00:54 AM10/25/05
to
> Huh ?
>
> Everybody can delete/cancel his own messages (using a
> newsreader).

Please move to the .test group. I posted a message titled "Can I
delete this?". Then I deleted it and I don't see it anymore. But
can you still read it? Just wondering, I'm not sure I really
deleted it from the server (I'm almost sure I did not).

Steve.


Hans Galema

unread,
Oct 25, 2005, 10:52:46 AM10/25/05
to
Steve Aletto wrote:

> Please move to the .test group. I posted a message titled "Can I
> delete this?". Then I deleted it and I don't see it anymore. But
> can you still read it? Just wondering, I'm not sure I really
> deleted it from the server (I'm almost sure I did not).

If the original post has contents:

Can I delete this?

Steve.

then it is still there.

As liz confirmed deleting is quite possible for own messages.

Maybe you have to use a real newsreader instead of OE ? <g>

Hans.

Bob Gonder

unread,
Oct 25, 2005, 11:05:31 AM10/25/05
to

Steve Aletto

unread,
Oct 25, 2005, 11:05:34 AM10/25/05
to
> Maybe you have to use a real newsreader instead of OE ? <g>

Maybe... but we're still doing some tests. Would you kindly post
and then delete a message in the .test group?

Steve.


Steve Aletto

unread,
Oct 25, 2005, 11:09:05 AM10/25/05
to

If I understood correctly, that's what I'm trying to explain.
They don't see the posts in _their_ newsreader, but they're
still on the server.

Steve.


Jonathan Benedicto

unread,
Oct 25, 2005, 11:14:52 AM10/25/05
to
Hans Galema wrote:
> Everybody can delete/cancel his own messages (using a newsreader).

That is what I thought. I've done it before, only haven't seen the results
because OE kept the message after it was cancelled.

Jonathan


Hans Galema

unread,
Oct 25, 2005, 11:24:39 AM10/25/05
to
Bob Gonder wrote:

> Please see this (which may wrap)

> http://tinyurl.com/9l62r

That is Google's cache.

See here where my message is no more there:
http://newsgroups.borland.com/cgi-bin/dnewsweb?cmd=xover&group=borland.public.cppbuilder.internet.socket&utag=
or
http://tinyurl.com/ckscp

Hans.

Bob Gonder

unread,
Oct 25, 2005, 11:41:06 AM10/25/05
to
Hans Galema wrote:

>That is Google's cache.

Yep.
Canceling a post doesn't help much if the sensitive data has already
escaped into the wild.


Steve Aletto

unread,
Oct 25, 2005, 11:44:08 AM10/25/05
to
> They don't see the posts in _their_ newsreader, but they're
> still on the server.

Nope. They're right instead. See .test group.

Steve.


Hans Galema

unread,
Oct 25, 2005, 11:53:42 AM10/25/05
to

Wild Google. How to empty it's cache ? ;-).

Hans.

Hans Galema

unread,
Oct 25, 2005, 3:28:14 PM10/25/05
to

As Jeff Overcash (TeamB) in borland.public.test stated you can only
delete your own message if post and cancel come from the same IP.

So you need a fixed IP address or post a cancel message in the
same dialup session.

Apparently the newsserver checks those IP's.

Hans.

Jonathan Benedicto

unread,
Oct 25, 2005, 4:40:56 PM10/25/05
to
Hans Galema wrote:
> As Jeff Overcash (TeamB) in borland.public.test stated you can only
> delete your own message if post and cancel come from the same IP.

Thank you for the confirmation.

Jonathan


Blake Young

unread,
Oct 25, 2005, 10:06:33 PM10/25/05
to
Nevermind. I went with Indy9 instead. Installed perfectly.


0 new messages