Testing SMTP with .net

后端 未结 17 1306
[愿得一人]
[愿得一人] 2020-12-04 09:54

I need to configure a SMTP server for testing my website which sends emails (for registration confirmation etc).

I dont actually want the email to be sent, I just w

17条回答
  •  感情败类
    2020-12-04 10:36

    Note that the SmtpClientWrapper class proposed by tvanfosson needs the all-important "virtual" keyword in its declaration of the Send method, otherwise you are back in the same boat as trying to Mock the SmtpClient directly.

提交回复
热议问题