Function sendJmail(strFromEmail, strFromName, strToEmail, strSubject, intBodyType, strBody) Dim msg Set JMail = Server.CreateObject("JMail.Message") JMail.Charset = "UTF-8" '邮件文字的代码为简体中文 JMail.Logging = True JMail.silent = True JMail.From = strFromEmail JMail.FromName = strFromName JMail.Subject = strSubject JMail.MailServerUserName = "自已的邮箱" '发送邮箱用户名 JMail.MailServerPassword = "密码" '发送邮箱密码 JMail.Priority = 3 ''邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值 JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") JMail.AddRecipient(strToEmail) If intBodyType = 1 Then JMail.ContentType = "text/html" End If JMail.AppendHTML(strBody) msg = JMail.Send("smtp.163.com")'对应的邮箱的服务器地址 response.Write(msg) JMail.Close() Set JMail = Nothing sendJmail = msg End Function 附: JMail4.5安装组件附中文操作手册 说明: 拷贝优快云代码,前面出现了行号,请用以下办法去掉 用正则去掉复制优快云博客代码前面的行号