CDONTS Specifying SMTP Server
Can you specify which SMTP server that CDONTS will use?
I know it automatically assumes you will use the local service. I need to use another SMTP server. Any thoughts?
Thanks in advance!
Can you specify which SMTP server that CDONTS will use?
I know it automatically assumes you will use the local service. I need to use another SMTP server. Any thoughts?
Thanks in advance!
Mark Hensler posted this at 07:49 — 28th February 2001.
He has: 4,048 posts
Joined: Aug 2000
I searched MSDN, and I don't believe this is possible. Sorry
Interesting link: http://msdn.microsoft.com/library/psdk/cdo/_denali_newmail_object_cdonts_library_.htm
Mark Hensler
If there is no answer on Google, then there is no question.
Peter J. Boettcher posted this at 13:09 — 28th February 2001.
They have: 812 posts
Joined: Feb 2000
1aspfan,
If you're using IIS5 you can use CDO for Windows 2000 which is a lot like CDONTS just better and faster and it let's you specify the mail server you want to use.
PJ | Are we there yet?
pjboettcher.com
1aspfan posted this at 14:30 — 28th February 2001.
They have: 32 posts
Joined: Jan 2001
For those of you who need to know how to do this, this is what I came up with thanks for your help!
using CDO for Win 2000 you can specify the smtp server.
IF NOT Request.Form(x) = "" THEN
sBody = sBody & vbCrLf & Request.Form.Key(x) & " = " & Trim(Request.Form(x))
END IF
NEXT
' setup the from
IF Request.Form("email") = "" THEN
sFrom = "Anonymous"
ELSE
sFrom = you
END IF
' mail section - setup of cdo for 2000
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "" 'replace this with your SMTP IP
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "recipient e-mail"
.From = "your email"
.Sender = "your email"
.Subject = "Form Output"
.TextBody = "" & sBody & ""
.Send
End With
%>
Mark Hensler posted this at 22:43 — 28th February 2001.
He has: 4,048 posts
Joined: Aug 2000
where did you find the documentation for that?
1aspfan posted this at 22:51 — 28th February 2001.
They have: 32 posts
Joined: Jan 2001
You can find documentation in:
Wrox
ASP 3.0
Programmer's Reference
There is a lot of useful stuff in there on CDO. There is also a lot of good stuff in the MSDN library as well.
Thanks!
1aspfan posted this at 22:52 — 28th February 2001.
They have: 32 posts
Joined: Jan 2001
This is CDOSYS.dll not CDONTS two different things!
Mark Hensler posted this at 08:19 — 1st March 2001.
He has: 4,048 posts
Joined: Aug 2000
ahhh...
I had search MSDN for "CDONTS"
thx!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.