我想做的效果很简单就是用户通过createUserWizard控件注册后之后会自动发一件邮件到客服的邮箱里,可以怎么做都不行,
我用winfrom测试过是可以的,但asp.net不行!这样就确定的电脑上的smtp服务器没有问题,下面是源代码,各位帮帮忙看看,多谢了!
1。web.config文件的内容<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis" />
</mailSettings>
</system.net> <system.web>
<authentication mode="Forms" />
</system.web>
</configuration>
//用的是PickupDirectoryFromIis 本地IIS的方式!2。是前台aspx页面的代码。<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<MailDefinition BodyFileName="~/r.txt" Subject="1754177" From="" />
</asp:CreateUserWizard>
</div>
</form>
</body>
</html>
我用winfrom测试过是可以的,但asp.net不行!这样就确定的电脑上的smtp服务器没有问题,下面是源代码,各位帮帮忙看看,多谢了!
1。web.config文件的内容<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis" />
</mailSettings>
</system.net> <system.web>
<authentication mode="Forms" />
</system.web>
</configuration>
//用的是PickupDirectoryFromIis 本地IIS的方式!2。是前台aspx页面的代码。<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<MailDefinition BodyFileName="~/r.txt" Subject="1754177" From="" />
</asp:CreateUserWizard>
</div>
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货