What have I done wrong?? this code produces and sends one email to each of entries in database, but the email contains copies of the previous emails in addition to the correct one...make sense??
if rs.EOF = false then
While rs.EOF = false
email = rs("Email"
'sending email to customer service
Set MyCDONTSMail = CreateObject("CDONTS.NewMail"
MyCDONTSMail.MailFormat = cdoMailFormatMIME
MyCDONTSMail.From = "whoever@home.com"
MyCDONTSMail.To= email
MyCDONTSMail.bCc= "jjj@mmm.com"
MyCDONTSMail.Subject= Request.Form("Subject"
MyCDONTSMail.BodyFormat = cdoBodyFormatHTML
MyBody = MyBody & "To: " & rs("fname" & " " & rs("lname" & "<br><BR>"
MyBody = MyBody & "From: " & "Mr. Magoo" & "<br><BR>"
MyBody = MyBody & body & "<br><BR>"
MyBody = MyBody & "<A href= & rs1("ID" & "and?number=" & rs("number" & ">" & "Click Here to Respond" & "</A>" & "<br>"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
rs.MoveNext
WEND
end if june.croft@sfmco.com
--only those that do not try, fail--
if rs.EOF = false then
While rs.EOF = false
email = rs("Email"
'sending email to customer service
Set MyCDONTSMail = CreateObject("CDONTS.NewMail"
MyCDONTSMail.MailFormat = cdoMailFormatMIME
MyCDONTSMail.From = "whoever@home.com"
MyCDONTSMail.To= email
MyCDONTSMail.bCc= "jjj@mmm.com"
MyCDONTSMail.Subject= Request.Form("Subject"
MyCDONTSMail.BodyFormat = cdoBodyFormatHTML
MyBody = MyBody & "To: " & rs("fname" & " " & rs("lname" & "<br><BR>"
MyBody = MyBody & "From: " & "Mr. Magoo" & "<br><BR>"
MyBody = MyBody & body & "<br><BR>"
MyBody = MyBody & "<A href= & rs1("ID" & "and?number=" & rs("number" & ">" & "Click Here to Respond" & "</A>" & "<br>"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
rs.MoveNext
WEND
end if june.croft@sfmco.com
--only those that do not try, fail--