473,226 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

specify user+pwd in CDO/CDONTS

Hello

I have a mailserver that requires windows authentication for sending email.

could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication.

TIA
/Lasse
Jul 19 '05 #1
11 4046
I don't think CDO.Message supports that. The commercial version of ASPEmail
does (http://www.aspemail.com/)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.com> wrote in message
news:#3**************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending email.
could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication.

TIA
/Lasse

Jul 19 '05 #2
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending email.
could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication. Something like below should work.

Note that CDO is the -backbone- component for Outlook express and for
Exchange (serverside). So, if any mail feature that Outlook Express
supports, can be programmed by you.

code below is non-tested but should be working.

Set myCDO = CreateObject("CDO.Configuration")
with cdoConfig.fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing").value =
2

..item("http://schemas.microsoft.com/cdo/configuration/smtpserver").value =
"192.168.0.7"

..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val
ue = 1 ' use clear text authenticate

..item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value =
"mypassword"

..item("http://schemas.microsoft.com/cdo/configuration/sendusername").value =
"yourusername"
.update
End With
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

TIA
/Lasse


Jul 19 '05 #3
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I don't think CDO.Message supports that.
The commercial version of ASPEmail > does (http://www.aspemail.com/)
CDO does as well :)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Jul 19 '05 #4
Wow, I stand corrected, thanks Egbert! Now off to update all the FAQ
articles that state CDO is incapable of outgoing auth...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Egbert Nierop (MVP for IIS)" <eg***********@nospam.com> wrote in message
news:OG**************@tk2msftngp13.phx.gbl...
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending email.

could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication.

Something like below should work.

Note that CDO is the -backbone- component for Outlook express and for
Exchange (serverside). So, if any mail feature that Outlook Express
supports, can be programmed by you.

code below is non-tested but should be working.

Set myCDO = CreateObject("CDO.Configuration")
with cdoConfig.fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing").value

= 2

.item("http://schemas.microsoft.com/cdo/configuration/smtpserver").value =
"192.168.0.7"

..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val ue = 1 ' use clear text authenticate

.item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value = "mypassword"

.item("http://schemas.microsoft.com/cdo/configuration/sendusername").value = "yourusername"
.update
End With
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

TIA
/Lasse

Jul 19 '05 #5
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
Wow, I stand corrected, thanks Egbert! Now off to update all the FAQ
articles that state CDO is incapable of outgoing auth...


CDO rocks!
But if you state that in the FAQ, if you have time, check the code :) I
might have forgotten something.
Jul 19 '05 #6
> But if you state that in the FAQ, if you have time, check the code :) I
might have forgotten something.


Tested, updated.
http://www.aspfaq.com/2026#auth

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #7

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
But if you state that in the FAQ, if you have time, check the code :) I
might have forgotten something.

Looks good.
Thanks for the good work :)
Jul 19 '05 #8
Thanks aron and egbert..... works....

btw....... why is this needed?

<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->

hard to remember that til next time its needed :(

/Lasse
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending email.
could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication.

TIA
/Lasse

Jul 19 '05 #9
This is a Type Library that allows you to use named constants. Beats
remembering the number and/or hex values for all the parameters...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.com> wrote in message
news:Oq*************@tk2msftngp13.phx.gbl...
Thanks aron and egbert..... works....

btw....... why is this needed?

<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->

hard to remember that til next time its needed :(

/Lasse
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending

email.

could you guys show me an example of how to specify user and password in
CDO/CDONTS?

i cant configure it to send with no authentication.

TIA
/Lasse


Jul 19 '05 #10
Aaron,

but its possible do it without it?

/Lasse

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
This is a Type Library that allows you to use named constants. Beats
remembering the number and/or hex values for all the parameters...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.com> wrote in message
news:Oq*************@tk2msftngp13.phx.gbl...
Thanks aron and egbert..... works....

btw....... why is this needed?

<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->

hard to remember that til next time its needed :(

/Lasse
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

I have a mailserver that requires windows authentication for sending

email.

could you guys show me an example of how to specify user and password in CDO/CDONTS?

i cant configure it to send with no authentication.

TIA
/Lasse



Jul 19 '05 #11
> but its possible do it without it?

Sure, if you want a bunch of statements like this:

CONST cdoBlahBlah = 1
CONST cdoSomethingElse = 5
CONST cdoAnotherThing = 0xH0004
....

Or, if you want to memorize the value for each and know without question
what it means (note that this makes your code much more cryptic).

Or, if you want to use the more verbose, and slightly misleading, URL style,
e.g.

Set cdoConfig = CreateObject("CDO.Configuration")

cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendus
ing") = 2

(But you still have to remember what 2 means! Does that mean local pickup,
or use a specific smtp server?)

You seem to be troubled by the fact that you might have to memorize that
metadata tag? Not sure why you might think that; I certainly don't have it
memorized. You can put that metadata tag in a text file, somewhere easy to
reach, and just copy and paste. Or you can just grab it from
http://www.aspfaq.com/2026 whenever you need it.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ryan McLean | last post by:
Hello everyone! I have a question for ya'll. In a web-based asp application I am creating and (attempting to) attach a file. The email sends correctly, but when I try to open the attachment, it...
2
by: Andy | last post by:
Hi Gang I can create an email with ASP's using CDONTS and this works well. I'd like to format the email as HTML. Can I do this with ASP's and CDONTS? Regards, Andy
8
by: Boris | last post by:
Could someone please tell me if I can use CDONTS in W 2003 Server environment to send emails the same way it is used in W2K Server. I have heard that CDONTS is no longer available in W 2003 Server...
3
by: Shaun | last post by:
Hi all, I'm convertinmg an Access 2002 application to SQL Server with many differant locations, each needs their own instance of the database on the same physical server so I have created an INI...
2
by: vn | last post by:
I have deployed a simple aspx application on my server(which has windows2003 & iis6.0) and also deployed on my workstation(windows 2000workstation & iis5.0) Application runs fine when tested...
7
by: greatcanyon | last post by:
Hi, When I create a new user in DB2, can I set the default schema to an existing schema? The reason I want to do this is that I want to later connect to db2 as this user and access tables...
7
by: gopal | last post by:
Hi, I have a console application whose purpose is to run the OSQL utility from my console application. When my application is run, the OSQL utility is started and it has to prompt for...
7
by: Paul | last post by:
I have just started work on a system using CDONTS to mail out. Whilst this is fine on the server, my local development machine is using XP Pro with IIS5.1 installed. Is there a way I can get the...
15
by: Earl Partridge | last post by:
If there's a newgroup for this subject, please point me to it... Is it possible to set the font size of the body of the text? Earl
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.