473,466 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4054
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.