.

Godaddy支持在线发邮件的代码
分类:电脑知识 发表于:2010-12-30 19:56:56 评论(2)


<%

email=request("email")

content=request("content")

Function Send_Email(content)

sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"

smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"

′ Set the mail server configuration

Set objConfig=CreateObject("CDO.Configuration")

objConfig.Fields.Item(sendUrl)=2 ′ cdoSendUsingPort

objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"

objConfig.Fields.Update

′ Create and send the mail

Set objMail=CreateObject("CDO.Message")

′ Use the config object created above

Set objMail.Configuration=objConfig

objMail.From = email

objMail.To = "收信邮箱"

objMail.BodyPart.Charset = "utf-8"

objMail.Subject = "主题"

objMail.TextBody = content

objMail.Send

Set objMail = Nothing

End Function

%>

调用:

<%Call Send_EMail(content)%>

备注:

1.“email”为发信人所填的邮箱,收到邮件后直接成为发信箱。

2.不管是发信箱,收信箱,还是内容,全都不得出现QQ字样,GODADDY全面屏蔽QQ,写了就会出错。

  
邮箱: 密码:
  • 农夫三拳 (2010-12-31 09:22:15)
    QQ就这么不受“狗他爹”待见呀? 这家伙很懒
    • 阿和 博主 (2010-12-31 11:05:17)
      大概那啥QQ跟狗狗有点暧昧,所以不受他爹待见吧。。。