<% function sendmail(rec_email) On error resume next Dim JMail, contentId Set JMail = Server.CreateObject("JMail.Message") JMail.Charset = "gb2312" ' 邮件字符集,默认为"US-ASCII" JMail.FromName = "佳佳软件中心" ' 发送者姓名 JMail.Subject = "您好,您好!欢迎光临http://www.job266.com" ' 邮件主题 JMail.Priority = 3 JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") JMail.AddRecipient(rec_email) JMail.HTMLBody = "您好!欢迎光临" JMail.MailServerUserName = "用户名" '身份验证的用户名 JMail.MailServerPassword = "密码" '身份验证的密码 JMail.Send("smtp.qq.com") 'smtp服务器 if err.number<>0 then response.write "发送失败!" else response.write "发送成功!" end if ifJMail.Close() Set JMail = Nothing end function %> 状态: <% sendmail("504920177@qq.com") %>
ASP+JMAIL发送邮件
最新推荐文章于 2021-07-30 03:07:08 发布