Hi thanks for your question. Yes, it's easy to use smtp4dev's smtp engine to perform automated tests. Here's an example:
List<Message> messages = new List<Message>();
DefaultServer server = new DefaultServer(Ports.AssignAutomatically);
server.MessageReceived += (s, ea) => messages.Add(ea.Message);
//do something to send mail here
//you can get the port number to use from server.PortNumber
You'll need to add a reference to the Rnwood.SmtpServer assembly and add a using for the Rnwood.SmtpServer namespace to get this to compile.
You can replace Ports.AssignAutomatically with a literal port number if you always want it to run on the same port number or use one of the other overloads (and provide a certificate) if you
want to use SSL.
If you want to examine the message in more detail than the properties of the Message class can provide then you'll need to feed the "Data" from the message into sharpmimetools (included with smtp4dev).
You can see how smtp4dev does this here: