I have a function which creates a report and sends it to a user. What I\'ve done is create a mock for the email function, and verify if the \'send\' function of the email class
I recently ran into this issue myself. Try using http://netdumbster.codeplex.com/. This library allows you to spin up a local SMTP server and check which mails it received. This is all handled in memory AFAIK so the perfomance impact on your test should be minimal.
In your test you create the server like this
SimpleSmtpServer server = SimpleSmtpServer.Start(25);
Then just change the config of your mail sender class to use the local smtp server (localhost:25). After the mail is send you can access it like this
server.ReceivedEmail[0]
And use the Data or MessageParts property to check for subject, body and attachments.
I hope this helps.