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
560 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP Classic - Read XML File inner content 10 49
Two decimal 5 30
Table header must be on top 2 31
JQuery DataTable Functionality 8 20
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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