Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDONTS.NewMail Object and Windows Server 2003

Reply
Thread Tools

CDONTS.NewMail Object and Windows Server 2003

 
 
Paul
Guest
Posts: n/a
 
      01-25-2005
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


 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      01-25-2005
"Paul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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).


 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      01-25-2005
http://www.aspfaq.com/show.asp?id=2026

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

"Paul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>
>



 
Reply With Quote
 
Dr. Know
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows server SBS cost less then Windows Server 2003 Steve Benson Computer Support 4 08-26-2005 05:29 PM
Deploying Business Desktops with Microsoft Windows Server 2003 and Microsoft Office 2003 Karthik Ragavan Microsoft Certification 0 08-17-2005 05:08 PM
Beta Exam 71-139: Deploying Business Desktops with Microsoft Windows Server 2003 and Microsoft Office 2003 lowdes MCSE 1 07-19-2005 02:45 PM
Windows Server 2003 SP1 and VS Studio 2003 installation program Jeremy Holt ASP .Net 0 04-01-2005 05:02 AM
Windows 2003 Server or Exchange Server 2003 first????? Ozzie MCSA 1 11-30-2004 01:10 AM



Advertisments