godaddy的win主机发邮件的组件
2009-03-11 15:56
190 查看
1 CDOSYS
The server "relay-hosting.secureserver.net" is used to send email fromyour hosted domain. You must populate the SmtpMail object's SmtpServerproperty with this value. Our shared hosting servers allow for emailattachments up to 30 MB.
复制内容到剪贴板
代码:
参考http://help.godaddy.com/article/1073
2 CDONTS.NewMail
复制内容到剪贴板
代码:
iis7.0下的代码示例
复制内容到剪贴板
代码:
[ 本帖最后由 add.c 于 2008-7-17 10:29 AM 编辑 ]
The server "relay-hosting.secureserver.net" is used to send email fromyour hosted domain. You must populate the SmtpMail object's SmtpServerproperty with this value. Our shared hosting servers allow for emailattachments up to 30 MB.
复制内容到剪贴板
代码:
// language -- C# // import namespace using System.Web.Mail; private void SendEmail() { const string SERVER = "relay-hosting.secureserver.net"; MailMessage oMail = new System.Web.Mail.MailMessage(); oMail.From = "emailaddress@domainname"; oMail.To = "emailaddress@domainname"; oMail.Subject = "Test email subject"; oMail.BodyFormat = MailFormat.Html; // enumeration oMail.Priority = MailPriority.High; // enumeration oMail.Body = "Sent at: " + DateTime.Now; SmtpMail.SmtpServer = SERVER; SmtpMail.Send(oMail); oMail = null; // free up resources }
参考http://help.godaddy.com/article/1073
2 CDONTS.NewMail
复制内容到剪贴板
代码:
<% from = request.form("from") body = request.form("body") subject = request.form("subject") %> <% Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = from objMail.Subject = subject objMail.To = "hard-code your email address" objMail.Body = body objMail.Send Set objMail = Nothing Response.redirect "thankyou.asp" '<- auto-redirection 'You must always do this with CDONTS. 'Change the page name to one that exists on your site. %>
iis7.0下的代码示例
复制内容到剪贴板
代码:
<% Dim MyBody Dim MyCDONTSMail Set MyCDONTSMail = CreateObject("CDONTS.NewMail") MyCDONTSMail.From= "sender@coolexample.com" MyCDONTSMail.To= "recipient@coolexample.com" MyCDONTSMail.Subject="Subject" MyBody = "Body" MyCDONTSMail.Body= MyBody MyCDONTSMail.Send set MyCDONTSMail=nothing %>
[ 本帖最后由 add.c 于 2008-7-17 10:29 AM 编辑 ]
相关文章推荐
- Godaddy Windows主机组件支持情况
- 在美国godaddy虚拟主机上用php发邮件应该注意的问题
- godaddy虚拟主机access数据库中文乱码的解决方法
- Nodejs发邮件组件Nodemailer
- 帝国网站管理系统 恢复栏目目录 建立目录不成功!请检查目录权限 Godaddy Windows 主机
- redhat安装配置samba实现win共享linux主机目录
- 最新的2012年4-5月 godaddy 域名、主机注册优惠码 域名仅仅7.99美元
- C# 使用Vici WinService组件来创建Windows服务
- [转载]虚拟主机上安装Mambo核心系统/组件/模块技巧
- 网站超级卡,godaddy主机悲剧了!
- Windows 2003下不注册组件用ASP发邮件
- php在win下Socket方式发邮件类
- asp中用jmail,Cdonts组件和Aspemail组件发邮件
- 在Godaddy的Windows主机上使用MySql.Data.dll连接数据库
- GODADDY主机用tar命令通过SSH远程打包20M以上的文件
- 宿主机( win 7 系统) ping 虚拟机VMware( cent os 6.6 ) 出现“请求超时”或者“无法访问目标主机”的解决方法
- 有SSL和独立IP的GoDaddy美国主机合租计划,欢迎加入(已结束,谢谢关注)
- Godaddy 主机开通SSH的方法 2011-05-06
- Win主机上配置ARP静态绑定
- 使用微软的组件发邮件