By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,490 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

CDONTS.NewMail Object and Windows Server 2003

P: n/a
I am using the CDONTS.NewMail object to send e-mail programmatically.

We upgraded our IIS server from NT to Windows 2003 Server.

Now it does not appear that the CDONTS object is available on the 2003
Server?

Is this correct?

If so, how does one send e-mail programmatically on 2003 Server using
"Classic ASP" (not .NET). Which object do I use?

TIA
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
I am using the CDONTS.NewMail object to send e-mail programmatically.

We upgraded our IIS server from NT to Windows 2003 Server.

Now it does not appear that the CDONTS object is available on the 2003
Server?

Is this correct?

If so, how does one send e-mail programmatically on 2003 Server using
"Classic ASP" (not .NET). Which object do I use?

TIA


Try CDO.Message (I think).
Jul 22 '05 #2

P: n/a
http://www.aspfaq.com/show.asp?id=2026

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
I am using the CDONTS.NewMail object to send e-mail programmatically.

We upgraded our IIS server from NT to Windows 2003 Server.

Now it does not appear that the CDONTS object is available on the 2003
Server?

Is this correct?

If so, how does one send e-mail programmatically on 2003 Server using
"Classic ASP" (not .NET). Which object do I use?

TIA

Jul 22 '05 #3

P: n/a
Paul said:
I am using the CDONTS.NewMail object to send e-mail programmatically.

We upgraded our IIS server from NT to Windows 2003 Server.

Now it does not appear that the CDONTS object is available on the 2003
Server?

Is this correct?

If so, how does one send e-mail programmatically on 2003 Server using
"Classic ASP" (not .NET). Which object do I use?


Hey! This is one I can answer!

This is a code snippet from a previous project - I became quite
familiar with CDOSYS when writing ACCESS Report E-Mail apps.
Replace variables appropriately.

Also, this routine uses cdoSendUsingPort, you might want to rewrite it
so that it uses the local drop directory instead. This was done for a
user who wanted to send e-mail through his local ISP account instead
of MS IIS SMTP.

Enjoy it, I've got lots of hours into figuing this stuff out!

Greg

---------------------------------------

Function SendReport( mSStr)
On Error GoTo 0
Dim mobjFlds
Dim mobjConf
Dim mobjMail
Dim strRet

strRet = ""
Set mobjConf = CreateObject("CDO.Configuration")
Set mobjFlds = mobjConf.Fields
With mobjFlds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPConnectionTimeout) = 60
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSMTPServer) = SMSERVER
.Item(cdoSMTPServerPort) = SMSERVERPORT
.Item(cdoSendUserName) = SMAUTHUSER
.Item(cdoSendPassword) = SMAUTHPASS
.Update
End With
Set mobjMail = CreateObject("CDO.Message")
mobjMail.Configuration = mobjConf
mobjMail.Fields(cdoImportance) = 1
mobjMail.Fields("urn:schemas:mailheader:X-MSMail-Priority") = 1
mobjMail.Fields("urn:schemas:mailheader:X-Mailer") = "Automated
ASP Report Mailer (c)2004 by D.G. Gillilan"
mobjMail.Fields.Update
mobjMail.From = "Mailer Daemon <" & SMEMAIL & ">"
mobjMail.To = SMEMAIL
mobjMail.ReplyTo = SMEMAIL
mobjMail.Subject = SMCOMPANY
mobjMail.AutoGenerateTextBody = False
mobjMail.MimeFormatted = False
mobjMail.TextBody = SMCOMPANY & vbCrLf & mSstr
on error resume next
mobjMail.Send
if err.number <> 0 then
Select Case err.Number
Case -2147220973
strRet = " Failure to Send Report Message -
Server Not Found" & vbCrLf & " Error: " & err.Number & " - " &
err.Description
Case -2147220975
strRet = " Failure to Send Report Message -
Server Authentication Failed" & vbCrLf & " Error: " & err.Number & "
- " & err.Description
Case Else
strRet = " Failure to Send Report Message -
Error: " & err.Number & " - " & err.Description
End Select
end if
on error goto 0
Set mobjConf = Nothing
Set mobjFlds = Nothing
Set mobjMail = Nothing
SendReport = strRet

End Function

Dr. Know
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.