wardkent
Posts: 4
|
| Posted: 11/16/2005, 12:06 PM |
|
I solved this myself. If anyone has other suggestions please feel free to comment. I am sure there could be a more streemlined approach but this is wroking.
Dim rs
Dim strUserEmail
Dim UrlID
UrlID = CCGetFromGet("ProjectID", 0)
'instantiate the data source
If DBgeneral.state <> 1 Then DBgeneral.Open
Set rs = DBgeneral.Execute("SELECT UserEmail FROM Project_Email_Lists Where ProjectID="&UrlID)
While NOT rs.EOF
'get email addresses
strEmailAddr = rs("UserEmail")
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "intramail.cis.cat.com"
Mail.From = CCDLookUp("UserEmail", "users", "usernum=" &_
DBgeneral.ToSQL(CCGetUserID(),ccsInteger), DBgeneral)
Mail.FromName = CCDLookUp("Name", "UserLookup", "usernum=" &_
DBgeneral.ToSQL(CCGetUserID(),ccsInteger), DBgeneral)
Mail.AddAddress strEmailAddr
Mail.Subject = "From project disucssion: " & CCDLookUp("ProjectName", "FieldProjects", "ProjectID="&UrlID, DBgeneral)
Mail.Body = "<b>Subject: </b> " & Field_project_discussion.Title.value & "<br><br><b>Message:</b> " & Field_project_discussion.Comment.value & "<p> </p> <p>This message was sent to you via the CIPL <a href='http://intranet.cosa.cat.com/lfcipl/start.asp'>website</a> project discussion board.<br>Please post reply on the website to capture the discussion.</p>"
Mail.IsHTML = True
Mail.Send ' send message
rs.MoveNext
Wend
'Clean Up
rs.close
Set rs = Nothing
|