CrimsonDiva
Programmer
Hi,
I'm trying to send out an indefinite number of emails using ASP/vbscript and CDONTS. I am able to receive all of the intended emails, but I notice that the actual message seems to be queueing, so that I receive all of the email text combined, in the last message sent. For example, if I send 2 messages out, the first one is fine. The second one has the text from the first message AS WELL AS the text that was intended for the 2nd message, itself. Why is this happening?
For intCount =1 to chkcount
objconn.BeginTrans
..
'Send email to each registrant
Set objNewMail = server.CreateObject("CDONTS.NewMail"
objNewMail.From = "support@somedomain.org"
objNewMail.To = email
'support HTML text for body
objNewMail.BodyFormat = CdoBodyFormatHtml
objNewMail.MailFormat = CdoMailFormatMime
objNewMail.Subject = "Some Subject"
emailbody = "Some Text"
objNewMail.Body = emailbody
objNewMail.Importance = 1
objNewMail.Send
set objNewMail = nothing
If Err.number <> 0 or objconn.Errors.Count > 0 then
'NEED TO CALL AN ERROR PAGE TO DISPLAY ERROR MESSAGES.
Response.Write "Error: "& Err.Description & "(" & SQL & ""
Response.END
objconn.RollbackTrans
Else
objconn.CommitTrans
End If
Next
...
Thanks, in advance, for your help!
I'm trying to send out an indefinite number of emails using ASP/vbscript and CDONTS. I am able to receive all of the intended emails, but I notice that the actual message seems to be queueing, so that I receive all of the email text combined, in the last message sent. For example, if I send 2 messages out, the first one is fine. The second one has the text from the first message AS WELL AS the text that was intended for the 2nd message, itself. Why is this happening?
For intCount =1 to chkcount
objconn.BeginTrans
..
'Send email to each registrant
Set objNewMail = server.CreateObject("CDONTS.NewMail"
objNewMail.From = "support@somedomain.org"
objNewMail.To = email
'support HTML text for body
objNewMail.BodyFormat = CdoBodyFormatHtml
objNewMail.MailFormat = CdoMailFormatMime
objNewMail.Subject = "Some Subject"
emailbody = "Some Text"
objNewMail.Body = emailbody
objNewMail.Importance = 1
objNewMail.Send
set objNewMail = nothing
If Err.number <> 0 or objconn.Errors.Count > 0 then
'NEED TO CALL AN ERROR PAGE TO DISPLAY ERROR MESSAGES.
Response.Write "Error: "& Err.Description & "(" & SQL & ""
Response.END
objconn.RollbackTrans
Else
objconn.CommitTrans
End If
Next
...
Thanks, in advance, for your help!