当任务分配给某人时,该任务之前分配给的人也应该得到通知。但是,这是行不通的。我不确定为什么这封电子邮件没有发送到 .Cc 电子邮件。有谁知道如何修复此代码?(电子邮件正在发送给 msg.to 收件人,并且“testcc”确实返回了有效的电子邮件地址值。
Set msg=Server.CreateObject("CDONTS.NewMail")
strSQL = "select emailaddress from UserList where userid = "&assign&";"
Set rs = objConnection.Execute(strSQL, ,adCmdText)
if not(rs.BOF and rs.EOF) then
temp = rs("emailaddress")
if(temp<>"" and temp<>"NULL") then
msg.To = rs("emailaddress")
end if
end if
strSQL = "select emailaddress from UserList where username = '"&assignedTo&"';"
Set rs = objConnection.Execute(strSQL, ,adCmdText)
if not(rs.BOF and rs.EOF) then
msg.Cc = rs("emailaddress")
testcc = rs("emailaddress")
end if
Response.write(testcc)
msg.From = "support@test.com"
msg.Subject = relname & " TaskID: "&maintid&" - New Task Assignment"
msg.MailFormat = CdoMailFormatMime
msg.BodyFormat = CdoBodyFormatHTML
Enotes = ""
msg.Body = Body & Enotes
msg.Send()