Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 16th, 2004, 08:26 AM
sometimes sometimes is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: St. Catharines, Canada
Posts: 51 sometimes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 34 sec
Reputation Power: 5
CDONTS help (code)

I am trying to send email with CDONTS in Access but I am getting an error very early in my code:

Public Function checkforemail()

Dim myConnection As ADODB.Connection
Set myConnection = CurrentProject.Connection
Dim myRecordSet As New ADODB.Recordset
myRecordSet.ActiveConnection = myConnection

'Dimension variables
Dim objCDOMail 'Holds the CDONTS NewMail Object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail") <<<-------------------ERROR HERE-----------------

'General variables.
Dim eMailAddress1 As String, eMailAddress2 As String
Dim EmailBody As String, EmployeeNumber As String
Dim DueDate As Date, CurrentDate As Date, LastNotify As Date, Callup As Date
Dim Days1 As Integer, Days2 As Integer, Days3 As Integer
Dim Reminder1 As String, Callup1 As String
Dim Reminder2 As Date, Callup2 As Date
Dim countEm As Integer, myMsg As String


countEm = 0 'This will keep track of the number of emails sent

myRecordSet.Open "MaintenanceJobs", , adOpenStatic, adLockOptimistic

myRecordSet.MoveFirst
Do Until myRecordSet.EOF 'include all items

CurrentDate = Date

DueDate = myRecordSet.Fields(7)
Days1 = DateDiff("d", DueDate, CurrentDate) 'Find out if the due date is here or past

If Days1 = 0 Then

eMailAddress1 = DLookup("[EmailName]", "[Employees]", "[EmployeeNumber]='" & myRecordSet.Fields(8).Value & "'")
EmailBody = myRecordSet.Fields(11).Value

objCDOMail.from = "myemail@somewhere.com"
objCDOMail.To = eMailAddress1
objCDOMail.Subject = "Testing CDONTS"
objCDOMail.BodyFormat = 1
objCDOMail.Body = [EmailBody]
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
'objCDOMail.Importance = 1
objCDOMail.Send
Set objCDOMail = Nothing


I am getting the error on the line marked out above...it is a Run Time error 424
just wondering if someone might know whats going on here??

Reply With Quote
  #2  
Old November 16th, 2004, 01:07 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 9 m 23 sec
Reputation Power: 181
The error indicates CDONTS isn't installed on your server.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old November 16th, 2004, 01:44 PM
sometimes sometimes is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: St. Catharines, Canada
Posts: 51 sometimes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 34 sec
Reputation Power: 5
Quote:
Originally Posted by Doug G
The error indicates CDONTS isn't installed on your server.

thanks, thats what I figured

Reply With Quote
  #4  
Old November 16th, 2004, 02:32 PM
sometimes sometimes is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: St. Catharines, Canada
Posts: 51 sometimes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 34 sec
Reputation Power: 5
I am on an XP server...can I use the CDO email method without any add-ons to the IIS??

Reply With Quote
  #5  
Old November 16th, 2004, 06:13 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 9 m 23 sec
Reputation Power: 181
Search for CDOSYS is the best I can offer, I use a different commercial Email component in my code and I'm not real familiar with any CDOwhatever stuff.

Reply With Quote
  #6  
Old November 17th, 2004, 08:07 AM
sometimes sometimes is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: St. Catharines, Canada
Posts: 51 sometimes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 34 sec
Reputation Power: 5
Quote:
Originally Posted by Doug G
Search for CDOSYS is the best I can offer, I use a different commercial Email component in my code and I'm not real familiar with any CDOwhatever stuff.


what do you use??

Reply With Quote
  #7  
Old November 18th, 2004, 02:08 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 9 m 23 sec
Reputation Power: 181

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > CDONTS help (code)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT