Solved

when I use cdo.message, where can I set my username and password required by my Email Server?

Posted on 2004-04-10
2
552 Views
Last Modified: 2008-02-01
Usually I use outlook to send my email. And my Email Server require username and password.
I can easily set them in the outlook. But now I want to send my email on my web site written in ASP by myself. I use cdo.message to do that. but I find I can only set the Email Server I used. but cannot find the place to set the username and password. if you know, please tell me.

Dim objCDO
Dim objConf
Dim objFields

Const cdoSendUsingPort = 2

' Put your mailservers ip address below
Const Mailserver ="smtp.citiz.net"

Set objCDO = Server.CreateObject("CDO.Message")
Set objConf = Server.CreateObject("CDO.Configuration")

Set objFields = objConf.Fields

objFields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
objFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Mailserver
objFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
objFields.Update

Set objCDO.Configuration = objConf
0
Comment
Question by:magichan
2 Comments
 
LVL 2

Accepted Solution

by:
pheine earned 125 total points
ID: 10802986
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now