Testing UAC with Email

We would like to use Selenium to validate email content generated from our site.

We could mock the mail server, but how are we going to validate the content of the emails?

We are using nUnit / Selenium / C #.

Does anyone have a good approach to this?

Thanks in advance!

+2


source to share


1 answer


This article by Phil Haack is great:

http://haacked.com/archive/2006/05/30/ATestingMailServerForUnitTestingEmailFunctionality.aspx

Let's assume you are not using Selenium with this approach, so this is not a general solution. What you can do is set up sending emails to the directory:

http://dotnettipoftheday.org/tips/smtp-delivery-method-SpecifiedPickupDirectory.aspx



And look at the folder, then look at the contents of the email.

You can use something like this and also some of the Selenium C # test code:

http://www.codeproject.com/KB/IP/despop3client.aspx

+3


source







All Articles