如何在asp.net c#中自动发送电子邮件? [英] How to send email automatically in asp.net c# ?
问题描述
i希望在asp.net c#中自动发送电子邮件。当新用户在网站上创建帐户(或在网站上注册)时,它会发送用户邮件地址的用户名和密码为了验证,我该怎么办?
i want to send email automatically in asp.net c# .when a new user creates an account on website(or registered on website),it will send username and password of user mail address for verification, so how can i do?
推荐答案
看看这里:
使用C#发送电子邮件有或没有附件:通用例程。 [ ^ ]
网上有很多例子,包括在CodeProject.com上如何在ASP.Net中发送电子邮件。您需要访问SMTP服务器,然后代码不是很难。
请参阅 https://www.google.com/#q=asp.net+send+email+sample [ ^ ]例如。
There are many examples online including on CodeProject.com of how to send emails in ASP.Net. You'll want access to a SMTP server and then the code is not very hard.
See https://www.google.com/#q=asp.net+send+email+sample[^] for examples.
在asp.net中自动发送电子邮件c#
send email automatically in asp.net c#
你必须为此编码,否则这将如何工作。
在 Google 和代码项目中搜索示例代码以通过C#发送邮件。你会发现很多。
当用户点击注册按钮时,在注册按钮点击事件里面,只需打电话发送包含所有必要数据的电子邮件的功能。
You have to code for that, otherwise how this will work.
Search in Google and Code Project for example codes to send a mail through C#. You will find many.
When user clicks Register Button, inside that Register Button Click Event, just call a function to send an email with all necessary data.
这篇关于如何在asp.net c#中自动发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!