Sending mails.
i use following vbscript function, but not working,
Pls let me know what is wrong?
-------------------------------
Function SendMail(receiver,sender,subject,content)
Dim ObjSendMail
Dim iConf
Dim Flds
Set ObjSendMail = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
'**** Path below may need to be changed if it is not correct
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
Flds.Update
Set ObjSendMail.Configuration = iConf
ObjSendMail.To = receiver
ObjSendMail.CC = sender
'ObjSendMail.BCC = receiver & "," & sender
ObjSendMail.Subject = subject
ObjSendMail.From = sender
' we are sending a html email.. simply switch the comments around to send an text email instead
ObjSendMail.HTMLBody = content
'ObjSendMail.TextBody = content
ObjSendMail.Send
Set ObjSendMail = Nothing
End Function
Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
|