Hi,
Could anybody help fathom what's wrong with this code, it's causing headache for me. It has been sending mails for almost one year to a mailing list of around 5,000. To my amazement the mails sent today contains no body as in the mails are blank. PLeaseeeeeeeeeee what could be the problem. Is it advisable to move this whole thing to a stored procedure on SQL Server. Becos it takes heaven to sent 5,000 mails in 30 mins
Code is Shown below
<% @Language="VBScript"%>
<% Option Explicit%>
<%
Response.Buffer = True
'declare all local variables
dim dcnDB 'As ADO.Connection
dim strSQL 'As String
Dim Mymail 'As CDONTS component
Dim rs 'As recordset 2
dim Message_Title
Dim Message_Body
Dim Email
Dim Kount
Dim lastprocid
Dim Table
Dim name
'Create the Connection Object
%>
<%
Set dcnDB = Server.CreateObject("ADODB.Connection"
dcnDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
& "Data Source=\\premfs5\sites\premium10\oysterbar\Database\success.mdb"
dcnDB.Open
'f:\Aspdatabase\Database\success.mdb
'Create the recordset object
If Request.QueryString("lastProc"
<> "" Then
strSQL = "SELECT Top 100 * FROM Mailinglist WHERE ID > " & Request.QueryString("lastProc"
& " ORDER BY ID"
lastprocid = Request.QueryString("lastProc"
+ 100
Else
strSQL = "SELECT TOP 100 * FROM Mailinglist ORDER BY ID"
lastprocid = 100
Response.Cookies("Title"
= Request.Form("Category_Title"
Response.Cookies("Message"
= Request.Form("Category_Message"
Response.Cookies("name"
=Request.QueryString("Name"
End If
Set rs = dcnDB.Execute(StrSQL)
'Message_Title = Request.Form("Category_Title"
'Message_Body = Request.Form("Category_Message"
If rs.EOF Then
name = Request.Cookies("name"
Response.Redirect "sendmessage3.asp?Name=" & Name &""
End if
Do While NOT rs.EOF
Set myMail = CreateObject("CDONTS.NewMail"
myMail.From = "successpower@samadeyemi.org"
myMail.To = rs("email1"
myMail.Subject = Request.Cookies("Title"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = Request.Cookies("Message"
'Replace(Message_Body,"""","\'"
'Replace(Message_Body, "&"&", "
myMail.Send
rs.MoveNext
Loop
%>
Thanks a bunch
Oysterbar ride to success. Keep Riding
Could anybody help fathom what's wrong with this code, it's causing headache for me. It has been sending mails for almost one year to a mailing list of around 5,000. To my amazement the mails sent today contains no body as in the mails are blank. PLeaseeeeeeeeeee what could be the problem. Is it advisable to move this whole thing to a stored procedure on SQL Server. Becos it takes heaven to sent 5,000 mails in 30 mins
Code is Shown below
<% @Language="VBScript"%>
<% Option Explicit%>
<%
Response.Buffer = True
'declare all local variables
dim dcnDB 'As ADO.Connection
dim strSQL 'As String
Dim Mymail 'As CDONTS component
Dim rs 'As recordset 2
dim Message_Title
Dim Message_Body
Dim Email
Dim Kount
Dim lastprocid
Dim Table
Dim name
'Create the Connection Object
%>
<%
Set dcnDB = Server.CreateObject("ADODB.Connection"
dcnDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
& "Data Source=\\premfs5\sites\premium10\oysterbar\Database\success.mdb"
dcnDB.Open
'f:\Aspdatabase\Database\success.mdb
'Create the recordset object
If Request.QueryString("lastProc"
strSQL = "SELECT Top 100 * FROM Mailinglist WHERE ID > " & Request.QueryString("lastProc"
lastprocid = Request.QueryString("lastProc"
Else
strSQL = "SELECT TOP 100 * FROM Mailinglist ORDER BY ID"
lastprocid = 100
Response.Cookies("Title"
Response.Cookies("Message"
Response.Cookies("name"
End If
Set rs = dcnDB.Execute(StrSQL)
'Message_Title = Request.Form("Category_Title"
'Message_Body = Request.Form("Category_Message"
If rs.EOF Then
name = Request.Cookies("name"
Response.Redirect "sendmessage3.asp?Name=" & Name &""
End if
Do While NOT rs.EOF
Set myMail = CreateObject("CDONTS.NewMail"
myMail.From = "successpower@samadeyemi.org"
myMail.To = rs("email1"
myMail.Subject = Request.Cookies("Title"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = Request.Cookies("Message"
'Replace(Message_Body,"""","\'"
'Replace(Message_Body, "&"&", "
myMail.Send
rs.MoveNext
Loop
%>
Thanks a bunch
Oysterbar ride to success. Keep Riding