我有以下 CDONTS 代码可以正常工作:
Dim CDONTSMail
Set CDONTSMail = CreateObject("CDONTS.NewMail")
CDONTSMail.From= "me@gmail.com"
CDONTSMail.To= "me@gmail.com"
CDONTSMail.Subject= "500.100 Error: " & objASPError.File
strBody = "This is a test message." & vbCrLf
CDONTSMail.Body= sErrorMes
CDONTSMail.Send
set CDONTSMail=nothing
但是下面在循环中使用的时候会报错吗?有任何想法吗?
'Create Mailer object and send message
CDONTSMail.From= "me@gmail.com"
CDONTSMail.To = Session("Email")
CDONTSMail.Subject = Subject
strBody = MainMessage & vbCrLf
CDONTSMail.Body= strBody
CDONTSMail.Send