How to test asp.net email is being sent

后端 未结 7 1572
再見小時候
再見小時候 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:30

    You can use SMTP4Dev

    http://smtp4dev.codeplex.com/

    Just install it (it's a little program that runs in your task bar). No configuration is required from your development program end...

    By default, I think it will just work with your code unmodified as it listens on your local host.

    You'll get a nice taskbar popup notification when you send emails... just click on the notification to look at the actual contents of the email!

提交回复
热议问题