From: kpg on
Using MAPI I've been sending email in vb6 for years. But what it does is
launch the clients desktop email program (outlook express, outlook,
whatever).

Many of my clients are now using web based email but want to email from my
app. I found code that sends email using a gmail account using cdo for vb6,
works great.

So I try it with my cox mail account and I get:

Sorry, You must login before using this server (or something like that).

So I found tons of articles claiming they know how to solve this, using
network credentials.

Well, I've tried most and still I cannot authenticate with the smtp server.

Note that outlook express has no trouble with this at all.

I'm already passing the username and password to the smtp server, but this
is not good enough. Apparently it must be done ion two steps, fine, but I
can't get it to work.

If I connect using outlook express, I can then send email, because, I
assume, I am now authenticated (at least for a short time).

So how does outlook express do this with servers that not only require
authentication but require that you "first login".

I'm always amazed at how the simplest things get so darn complicated.

Anyone have a a link to samples that overcome this issue?

Thanks,
kpg
From: Paul Clement on
On Tue, 11 May 2010 08:01:16 -0700, kpg <ipost(a)thereforeiam> wrote:

� Using MAPI I've been sending email in vb6 for years. But what it does is
� launch the clients desktop email program (outlook express, outlook,
� whatever).

� Many of my clients are now using web based email but want to email from my
� app. I found code that sends email using a gmail account using cdo for vb6,
� works great.

� So I try it with my cox mail account and I get:

� Sorry, You must login before using this server (or something like that).

� So I found tons of articles claiming they know how to solve this, using
� network credentials.

� Well, I've tried most and still I cannot authenticate with the smtp server.

� Note that outlook express has no trouble with this at all.

� I'm already passing the username and password to the smtp server, but this
� is not good enough. Apparently it must be done ion two steps, fine, but I
� can't get it to work.

� If I connect using outlook express, I can then send email, because, I
� assume, I am now authenticated (at least for a short time).

� So how does outlook express do this with servers that not only require
� authentication but require that you "first login".

� I'm always amazed at how the simplest things get so darn complicated.

� Anyone have a a link to samples that overcome this issue?

The following example might help:

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=41066&lngWId=1


Paul
~~~~
Microsoft MVP (Visual Basic)
From: kpg on
Paul Clement <UseAdddressAtEndofMessage(a)swspectrum.com> wrote in
news:u42ju5p35phspvfilfhk19ojg7ft8ig2k1(a)4ax.com:

> http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=41066
> &lngWId=1

No. I get the same error.

Error 421: Sorry, You must login before using this server.
From: MikeD on


"kpg" <ipost(a)thereforeiam> wrote in message
news:Xns9D75A3CE88F68ipostthereforeiam(a)207.46.248.16...
> Paul Clement <UseAdddressAtEndofMessage(a)swspectrum.com> wrote in
> news:u42ju5p35phspvfilfhk19ojg7ft8ig2k1(a)4ax.com:
>
>> http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=41066
>> &lngWId=1
>
> No. I get the same error.
>
> Error 421: Sorry, You must login before using this server.

If the SMTP server requires credentials, you (or the user) are going to have
to provide them. Provide a way in your app for the user to provide those
credentials. Other than that, there's not much you can do. The other thing
you can do is use an SMPT server that DOESN'T require logging in. Most
likely, this WON'T be the user's SMTP server. You can use any SMTP server.
It doesn't HAVE to be the user's. But in order to avoid providing
credentials, it's probably one that you need to provide and it'd be open
(meaning ANYONE could theoretically use it if they know about it).

--
Mike




From: Mayayana on

| No. I get the same error.
|
| Error 421: Sorry, You must login before using this server.

421 usually means "come back later". As far
as I know it's sent in response to EHLO, which
is the initial server connection. That happens
before you get to the password part.

http://email.about.com/cs/standards/a/smtp_error_code_2.htm

You might try asking in the VBScript group,
where a lot of people use CDO, and post
the actual code. There may be something you
can do.

Another possibility -- I don't know whether
this will help, but you might be able to debug
the connection with it:

http://www.jsware.net/jsware/scripts.php5#mailer

It's an ActiveX EXE that comes with a sample
script and an HTA. If you use debug settings to
send mail with the EXE, the HTA will report the
actual server conversation.

Also, you might visit cox.net and find out exactly
what settings you need to send email through them.
But if you're not sending from your home machine
that's connected through cox.net you may have a
problem. They may be checking the IP addess to
make sure it's one of theirs.