J
Jim
Hi
I would like to include a list from a recordset in a CDONTS email to be sent
to a customer at the end of a transaction.
So far I can add various fields as shown:
Set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.From = "(e-mail address removed)"
MailObj.To = rsSchools.Fields.Item("Email").Value
MailObj.Cc = "(e-mail address removed)"
MailObj.Bcc = "(e-mail address removed)"
MailObj.Subject = "Subject matter- " & (rsSchools.Fields.Item("School
Name").Value)
MailObj.Importance = 2
MailObj.Body = "GB 2004 entry received from: " &
rsSchools.Fields.Item("School Name").Value & VBCrLf &_
rsSchools.Fields.Item("Contact").Value & VBCrLf &_
rsSchools.Fields.Item("Address1").Value & VBCrLf &_
rsSchools.Fields.Item("Address2").Value & ", " &
rsSchools.Fields.Item("Town").Value & VBCrLf &_
rsSchools.Fields.Item("County").Value & ". " &
rsSchools.Fields.Item("PostCode").Value & VBCrLf &_
rsSchools.Fields.Item("Phone").Value & VBCrLf &_
rsSchools.Fields.Item("Email").Value & VBCrLf & VBCrLf &_
etc. etc
I would now like to add the content of an existing recordset to the email,
repeating until the recordset is empty.
What code do I need to add to the above?? Thanks for any help.
Jim
I would like to include a list from a recordset in a CDONTS email to be sent
to a customer at the end of a transaction.
So far I can add various fields as shown:
Set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.From = "(e-mail address removed)"
MailObj.To = rsSchools.Fields.Item("Email").Value
MailObj.Cc = "(e-mail address removed)"
MailObj.Bcc = "(e-mail address removed)"
MailObj.Subject = "Subject matter- " & (rsSchools.Fields.Item("School
Name").Value)
MailObj.Importance = 2
MailObj.Body = "GB 2004 entry received from: " &
rsSchools.Fields.Item("School Name").Value & VBCrLf &_
rsSchools.Fields.Item("Contact").Value & VBCrLf &_
rsSchools.Fields.Item("Address1").Value & VBCrLf &_
rsSchools.Fields.Item("Address2").Value & ", " &
rsSchools.Fields.Item("Town").Value & VBCrLf &_
rsSchools.Fields.Item("County").Value & ". " &
rsSchools.Fields.Item("PostCode").Value & VBCrLf &_
rsSchools.Fields.Item("Phone").Value & VBCrLf &_
rsSchools.Fields.Item("Email").Value & VBCrLf & VBCrLf &_
etc. etc
I would now like to add the content of an existing recordset to the email,
repeating until the recordset is empty.
What code do I need to add to the above?? Thanks for any help.
Jim