How to test asp.net email is being sent

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

    Can't you place this within a module and call it from a test and set the recipient to say you're email address. if you get the email then i'd say it's working.

    0 讨论(0)
提交回复
热议问题