How to test asp.net email is being sent

后端 未结 7 1555
再見小時候
再見小時候 2021-02-09 16:11

I have some code in my asp.net which sends an email:

public void SendEmail(string message)
{
    var body = message;

    var email = new MailMessage(Configurati         


        
7条回答
  •  花落未央
    2021-02-09 16:43

    Just create a folder called "maildrop" on your c:/ drive and use the following in your Web.config file:

    
        
            
        
    
    

    More information:

    http://weblogs.asp.net/gunnarpeipman/archive/2010/05/27/asp-net-using-pickup-directory-for-outgoing-e-mails.aspx

提交回复
热议问题