<%
Function Sendemail(subject,mailaddress,email,sender,content,fromer,password,flag,filepath)
Dim JMail,contentId
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true
JMail.Charset = "gb2312"
' JMail.ISOEncodeHeaders = False
JMail.From = fromer ' 发送者地址
JMail.FromName = sender ' 发送者姓名
JMail.Subject = subject ' 邮件主题
JMail.MailServerUserName = strFromer
JMail.MailServerPassword = password ' 身份验证的密码
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
FriendEmail=email '接收人邮件地址
Dim S,V,N,Q
S=FriendEmail
V=Split(S,",")
N=UBound(V)
For i=1 To N-1
JMail.AddRecipient(V(i))
Next
if filepath<>"" then
Dim S1,V1,N1,Q1
S1=","&filepath&","
V1=Split(S1,",")
N1=UBound(V1)
For i1=1 To N1-1
contentId = JMail.AddAttachment (Server.MapPath(V1(i1)),True)
Next
else
end if
MailBody = MailBody & "
"
MailBody = MailBody & content
MailBody = MailBody & ""
JMail.HTMLBody = MailBody
JMail.Body = content
Dim flag2
flag2=JMail.Send(""&mailaddress&"")
if flag=true then
if flag2=true then
response.Write("")
elseif flag2=false then
response.Write("")
else
response.Write("")
end if
else
end if
' 关闭并清除对象
JMail.Close()
Set JMail = Nothing
End Function
%>