English 中文(简体)
在伙伴关系中添加不同的电子邮件。 NET s web. 临时会议
原标题:Adding different e-mail s in ASP.NET s web.config at run-time

我很想知道,是否有一种自动方法,在网上添加电子邮件环境。

已经有一套电子邮件,目前情况如下:

<system.net>
    <mailSettings>
        <smtp deliveryMethod="Network">
            <network host="0.0.0.0" port="25" userName="whatever@whatever.com.br" password="stackoverflow" />
        </smtp>
    </mailSettings>
</system.net>

因此,我想的是:

1 - How do I add a new e-mail in there set by textboxes in the webform ?
2 - How do I differentiate which one I want to gather at the time ? could you give me a simple C# example on how to get the configs in one of the two ?

提前感谢!

最佳回答

这似乎比网络配置更适合数据库的要求。 如果你们感到必须,网络组合中可以增加/更新项目。 查阅WebConfigurationManager等,并采用相关方法。 请注意,投管处的菜单需要书写上网。 编外文件,以便工作。 这本身是一种风险。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签