Ask a Question related to ASP, Design and Development.
-
Janet #1
CDONTS Problem - no error msg
I verified that CDONTS and SMTP are supported by the server. I do not
receive an error message when I open the following ASP page nor do I
receive an email. I used response.write to verify that it creates a
recordset. As always, any help is appreciated. Code is as follows:
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
Dim objNewMail ' Our CDO object
Dim strTo ' Strings to hold our email fields
Dim strFrom
Dim strSubject
Dim strBody
Dim objConn
strFrom = "fromaddress@here.com"
strSubject = "!! Alert: Resource Brokering Request Expiration !!"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 15
objConn.CommandTimeout = 30
Dim strConnString
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("includes\database.mdb") & ";"
strSQL = "SELECT RECRUITER_EMAIL, JOB_FILE_NBR FROM RB_REQUEST WHERE
EXPIR_DT=#" & Date()+1 & "#"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, strConnString, adOpenKeyset, adLockPessimistic,
adCmdText
Do While Not RS.EOF
strTo = RS.Fields("RECRUITER_EMAIL")
strJob = RS.Fields("JOB_FILE_NBR")
strBody = "The Resource Brokering Request for Job File Number " &
strJob & vbCrLf _
& " will expire in 24 hours. Please extend the expiration date for
this request if necessary."
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = strFrom
objNewMail.To = strTo
objNewMail.Subject = strSubject
objNewMail.Body = strBody
'objCDO.Send
Set objNewMail = Nothing
RS.MoveNext
Loop
%>
Janet Guest
-
CDONTS error - too much data?
I have been using the CDONTS component on Windows 2000 to send emails for a long time now (code below). However, over time, the report that I am... -
ASP CDONTS error
Hi, I have been building a shopping cart & the final page will email the order to an address given however I get the following error message using... -
VBScript Error with CDONTS
Hello, Using IIS4 on a NT4 system.... sometimesI get the following error: Microsoft VBScript runtime error '800a0005' Invalid procedure call... -
error '8007045a' when executing CDONTS
How can I get text description of the error? This is ASP application, not .NET application. Thanks. *** Sent via Developersdex... -
error '8007045a' when executing CDONTS
I have the following sample code to send email from a form via CDONTS. I got error '8007045a' when executing the ASP page. Please help. THanks. ... -
Ray at #2
Re: CDONTS Problem - no error msg
Two things I see right at a glance.
1. You have your send command commented out.
2. If you were to uncomment that command, you'd be trying to send objCDO
instead of objNewMail.
Ray at work
"Janet" <jcasid01@sprintspectrum.com> wrote in message
news:9a828fd7.0307301227.7c9936ba@posting.google.c om...
> Set objNewMail = Server.CreateObject("CDONTS.NewMail")
> objNewMail.From = strFrom
> objNewMail.To = strTo
> objNewMail.Subject = strSubject
> objNewMail.Body = strBody
> 'objCDO.Send
> Set objNewMail = Nothing
>
>
> RS.MoveNext
> Loop
>
> %>
Ray at Guest
-
Mike #3
Re: CDONTS Problem - no error msg
Try this page first.
<%
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "somemail@somewhere.com"
objEmail.To = "<your email address>"
objEmail.Subject = "cdotest"
objEmail.HTMLbody = Test
objEmail.Send
%>
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%237KgHntVDHA.1748@TK2MSFTNGP12.phx.gbl...> Two things I see right at a glance.
>
> 1. You have your send command commented out.
> 2. If you were to uncomment that command, you'd be trying to send objCDO
> instead of objNewMail.
>
> Ray at work
>
> "Janet" <jcasid01@sprintspectrum.com> wrote in message
> news:9a828fd7.0307301227.7c9936ba@posting.google.c om...
>>> > Set objNewMail = Server.CreateObject("CDONTS.NewMail")
> > objNewMail.From = strFrom
> > objNewMail.To = strTo
> > objNewMail.Subject = strSubject
> > objNewMail.Body = strBody
> > 'objCDO.Send
> > Set objNewMail = Nothing
> >
> >
> > RS.MoveNext
> > Loop
> >
> > %>
>
Mike Guest



Reply With Quote

