Set objMail = Server.CreateObject("CDO.Message") Set objCDO = Server.CreateObject("CDO.Configuration") objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") =2objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "smtp.mxhichina.com" '
邮件服务器,我这里用
的是阿里云objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "XXX@XXX.com"'
发送邮件的邮箱地址objCDO.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "XXX"'密码objCDO.Fields.Update Set objMail.Configuration = objCDOobjMail.From = "XXX@XXX.com"''发件人,这里和上面的发送邮件地址保持一致objMail.Subject = "用户信息" ''标题objMail.To = "aaa@163.com"''收件人objMail.HtmlBody = "邮件正文内容"'发送内容。objMail.SendCDO 应该是OE使用 邮件组件
不是JMAIL.
如果你用的JMAIL 这应该 =CreateObject("JMAIL.MESSAGE")
当然JMAIL记得注册下
评论列表(0条)