asp+来源:http://www.aspfree.com/asp+/demos/emailhtml1.aspx
html1.htm
---------------------------------------------------------------------
<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form method="post" name="frmEmail" action="email.aspx" >
发送邮件给:<input type="text" name="mailto" size="30" value="someonechinaasp.com">
<input type="submit" value="ASP+ 邮件发送" name="cmdSubmit">
</form>
</body>
</html>
emal.aspx
---------------------------------------------------------------------
<% Import Namespace="System.Web.Util" %>
<script language="VB" runat=server ID=Script1>
Sub Page_load(Sender as Object, E as EventArgs)
Dim MyMail as New MailMessage
MyMail.To = request.form("mailto")
MyMail.From = "webmaster"
MyMail.Subject = "webmaster给您发了一封电子邮件"
MyMail.BodyFormat = MailFormat.Html
MyMail.Body = "<html><body><h1><a
<html>
<head>
<title>ASP+邮件发送</title>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
一封HTML格式邮件发送到了:
<h1><% response.write(request.form("mailto")) %></h1>
</body>
</html>
--------------------------------------------------------------
我注意到了3点问题:
居然在vs7 pdc preview的msdn library里面没有找到这个内容 :(
所以没法了解更多详细内容了。
微软只使用自己的东西,这一点让我感觉很不爽。
我使用的是拨号,用mmc编辑smtp server的属性,绑定smtp服务到我拨号时候获得的IP上,就能成功发送邮件了。
你必须在当前web目录的config.web中加上下列语句
<globalization
requestencoding="gb2312"
responseencoding="gb2312"
/>
或者你也可以
修改winnt\complus\v2000.14.1812目录中的config.web文件
<globalization
requestencoding="gb2312"
responseencoding="gb2312"
/>