ASP: CDONTS snippet

I forget why I kept this, but I run into this problem every now and again -- that of having to send mail with a site that runs ASP. I'm sure this code helped me in the past, if only I could remember how.

Set newMsg = CreateObject("CDO.Message")
newMsg.From = Dlookup("settings","notify_new_from","settings_id=1")
newMsg.To = Dlookup("users","email","user_id=" & fldassigned_to)
newMsg.Subject = mailSubject
newMsg.HTMLbody = mailBody
newMsg.Configuration.Fields.Item("") = 2
newMsg.Configuration.Fields.Item("") = ""
newMsg.Configuration.Fields.Item("") = 25
set newMsg=Nothing

I got a comment, before I had comments, in April 2005, from a visitor named Rich:

You say that you don't remember why you keep that script around. It looks to be an Access Function using the intrinsic DLookup (Domain Lookup). I don't think that you can use this "as-is" on a site. But rather within an Access File, or at the minimum a reference to the Access Library.

Looks that way to me anyways.

Again, Great site!