• ----:)欢迎访问源码网(:----
    • 首页
    • 博客
    • 学院
    • 下载
    • 论坛
    • 影视
    • 发布源码
    • RSS
    • ITPig
    • 笑话网
    • 百家姓
    • 繁體中文

源码网 - 中国第一源码门户
选择镜像:网通镜像 - 电信主站
  • 首 页
  • 新闻动态
  • 网站运营
  • 网页制作
  • WEB开发
  • 编程开发
  • 图像媒体
  • 操作系统
  • 数据库
  • 服务器
热门搜索 优化 SEO 故事 cms IIS7 MySQL 个人 AdSense 主题推广 | 文章搜索: 高级搜索
会员登录/控制面版您的位置: 学院首页 >> WEB开发 >> ASP开发 >> 系统相关 >> 详细内容
 

推荐文章

 
 

热点文章

  • ASP+中文教程
  • 展现 C#
  • ASP+上传文件语法
  • 如何在ASP+中发送邮件
  • asp+的几个特点
  • ASP控制计算机函数ADSI发表
  • asp+初体验---用c#写的asp+域名查询程序
  • ASP+中执行简单的Select查询,并返回数据表到DataGrid
  • ASP+数据库操作例子
  • ASP+ 跟踪
  • 一份ASP内存的释放的实验报告
  • ASP+页缓存OutputCache Duration用法
 
 

相关文章

  • ASP+中GetTitleAuthors和PutTitleAuthors应用例子
  • ASP+页缓存OutputCache Duration用法
  • ASP+中执行简单的Select查询,并返回数据表到DataGrid
  • 让您的主页支持各种浏览设备(ASP+篇)
  • ASP+培训教材
  • ASP+数据库操作例子
  • 转换ASP到ASP+
  • asp+与asp的区别
  • 突破性的ASP+技术
  • asp+语法介绍
  • Active Server Pages + 介绍
  • ASP+与ASP有哪些区别
 
 

百度搜索

 
 

如何在ASP+中发送邮件

  • 阅览次数:
  • 文章来源: 网海之贝
  • 原文作者: 佚名
  • 整理日期: 2006-10-03
  • 发表评论
  • 字体大小:
  • 小
  • 中
  • 大

This article features how to send email from an ASP+ page.  Using email from an ASP+ page has many uses
(Notify of errors, inform people about a a subject. etc..).    This code sample sends a formatted HTML
message to the email address entered.  Enjoy this free code!

Here is the code

Page 1.  The input form

<html>
<head>
</head>
<body>

<form method="post" name="form1" action="emailhtml2.aspx">
Email Address:<input type="text" name="EmailAddress" size="30" value="youremail@address.com"><br><br>
<input type="submit" value="Send Your Friend an Email using ASP+" name="b1">
</form>
</body>
</html>


Page 2.  Sends the email code

<%@ Import Namespace="System.Web.Util" %>

<script language="VB" runat=server>

Sub Page_load(Sender as Object, E as EventArgs)

Dim MyMessage as New MailMessage

MyMessage.To = request.form("EmailAddress")
MyMessage.From = "webmaster"
MyMessage.Subject = "This is message is from ASPFree using ASP+"

Note:We added the BodyFormat to show how to send
formatted HTML remove this line and all the HTML code in
message. The email will send as regular text
MyMessage.BodyFormat = MailFormat.Html

MyMessage.Body = "<html><body><h1>You received this email from <a
href='http://aspfree.com'>ASPFree.com</a> using ASP+!</h1></body></html>"
SmtpMail.Send(MyMessage)

End Sub

</script>
<html>
<head>
<title>Email Formatted HTML message with ASP+</title>
</head>
<body>
You just sent an email message formatted in HTML to:<br>
<h1><% response.write(request.form("EmailAddress")) %></h1>

</body>
</html>
       

上一篇:PHP编程技巧:看实例学正则表达式
下一篇:构建支持Master/Slave读写分离的数据库操作类
  • 网友评论:
  • 查看所有评论
  • 我要发表评论
您的网名:
留言主题:
你要发表的内容:

 

关于本站 | 广告联系 | 版权声明 | 网站地图 | 发布软件 | 帮助中心 | 源码论坛

Copyright © 2005-2007 CodePub.Com  程序支持:木翼  滇ICP备05005971号