<%
Sub Jmail(Email,Topic,Mailbody)
On Error Resume Next
Dim JMail
Set JMail = Server.CreateObject("JMail.Message")
JMail.silent=true
JMail.Logging = True
JMail.Charset = "utf-8"
If Not(E_ServerUser = "" Or E_ServerPass = "") Then
  JMail.MailServerUserName = E_ServerUser
  JMail.MailServerPassword = E_ServerPass 
End If
JMail.ContentType = "text/html"
JMail.Priority = 1
JMail.From = E_SendManMail
JMail.FromName = E_SendManName
JMail.AddRecipient Email
JMail.Subject = Topic
JMail.Body = Mailbody
JMail.Send (E_Server)
Set JMail = Nothing
SendMail = "OK"
If Err Then SendMail = "False"
End Sub

Sub Cdonts(Email,Topic,Mailbody)
Dim ObjCDOMail
Set ObjCDOMail = Server.CreateObject("CDONTS.NewMail")
ObjCDOMail.From = E_SendManMail
ObjCDOMail.To = Email
ObjCDOMail.Subject = Topic
ObjCDOMail.BodyFormat = 0 
ObjCDOMail.MailFormat = 0 
ObjCDOMail.Body = Mailbody
ObjCDOMail.Send
Set ObjCDOMail = Nothing
SendMail = "OK"
If Err Then SendMail = "False"
End Sub

Sub Cdom(Email,Topic,Mailbody)
Set objMail = Server.CreateObject("CDO.Message") 
Set objConfig = Server.CreateObject ("CDO.Configuration") 
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = E_Server
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = E_ServerUser
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = E_ServerPass
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/languagecode") = "0x0804" 
objConfig.Fields.Update() 
Set objMail.Configuration = objConfig
objMail.Subject = topic
objMail.From = E_SendManMail
objMail.To = email
objMail.HTMLBody = mailbody
objMail.Send 
Set objMail = Nothing
End Sub

Sub Aspemail(Email,Topic,Mailbody)
Dim Mailer
Set Mailer = Server.CreateObject("Persits.MailSender")
Mailer.Charset = "utf-8"
Mailer.IsHTML = True
Mailer.username = E_ServerUser
Mailer.password = E_ServerPass 
Mailer.Priority = 1
Mailer.Host = E_Server
Mailer.Port = 25 
Mailer.From = E_SendManMail
Mailer.FromName = E_SendManName 
Mailer.AddAddress Email,Email
Mailer.Subject = Topic
Mailer.Body = Mailbody
Mailer.Send
SendMail = "OK"
If Err Then SendMail = "False"
End Sub
dim SendMail

Sub SendEmail(Mailto,Subject,HtmlCode,SendMode)
if SendMode="" then SendMode="Jmail"
if SendMode="Jmail" then
  Jmail MailTo,Subject,HtmlCode
elseif SendMode="Cdonts" then
  Cdonts MailTo,Subject,HtmlCode
elseif SendMode="Aspemail" then
  Aspemail MailTo,Subject,HtmlCode
elseif SendMode="Cdom" then
  Cdom MailTo,Subject,HtmlCode
end if
End Sub
%>