<%
Function SendMailExtended(ByVal sSender, ByVal sRecipient, ByVal sCCRecipient, ByVal sBCCRecipient, ByVal sSubject, ByVal sText, ByVal bHTML, ByVal iPriority)
Dim oMail, bOk, oConfig
On error resume next
Set oMail = Server.CreateObject("CDONTS.NewMail")
If bHTML Then
oMail.BodyFormat = 0
oMail.MailFormat = 0
If InStr(sText, "<html>") = 0 Then
oMail.Body = "<html><body>" & vbCRLF & Text2HTML(sText) & vbCRLF & "</body></html>"
else
oMail.Body = Text2HTML(sText)
end if
Else
oMail.BodyFormat = 1
oMail.MailFormat = 1
oMail.Body = sText
End If
oMail.Importance = iPriority
oMail.From = sSender
oMail.To = sRecipient
oMail.Subject = sSubject
if trim(sCCRecipient) <> "" then
oMail.Cc = sCCRecipient
end if
if trim(sBCCRecipient) <> "" then
oMail.Bcc = sBCCRecipient
end if
oMail.Send
If Err <> 0 Then
Err.Clear
bOk = False
Else
bOk = True
End If
On Error Goto 0
set oMail = nothing
SendMailExtended = bOk
End Function
%>