When creating or updating notification templates within SCSM you will find that you want to test them and ensure that the correct e-mail template is being sent out at the right time to the right people before putting the modifications in to production. System Center Service Manager (SCSM) has a single e-mail communications channel to send e-mails. Set this to any SMTP server and it will effectively send e-mails to the recipient regardless of if the notification is a test or a real notification. To be able to test notification workflows before making production changes that send real e-mails to real end users, you would usually have to have a separate list of test users and have mailboxes set up for all of them. This is time-consuming, a waste of resources and does not accurately reflect your real production environment.
Instead, it is possible to replace the communications channel with a local application that would capture the SMTP request and show it to you, rather than sending the e-mails to end users and causing a flood of unnecessary emails.
Another common issue with e-mail communication testing people often have is disabling the workflows to prevent the e-mails being sent. However, this does not stop the e-mails being sent (eventually) as the system will just queue the e-mails for sending later, providing admins with lots of overtime work cleaning up days or months worth of e-mails all sent at the same time.
The solution to these challenges starts with an app called Papercut SMTP by Changemaker Studios that is an open-source application based on Github.
Papercut SMTP is a 2-in-1 quick email viewer AND built-in SMTP server (designed to receive messages only). Not only does it not enforce any restrictions on how you prepare your email, but it allows you to view the whole email body, html, headers, and attachments down to the raw encoded bits to help diagnose template issues. Papercut can be configured to run on start-up and sit quietly (minimized in the tray), only providing a notification when a new message has arrived. The interface allows you to see who the e-mail would have been sent to if it were to be sent to your production SMTP server and delivered to your end users.
Because the application only receives e-mails and never forwards them there is no risk of flooding production end users with test e-mails and you can use real world user accounts, names, and e-mail addresses as they are synced directly from your AD environment in to SCSM. This makes the testing more valid as it is using the real-world data that might not be perfect or the same configuration as a test environment.
This solution alone is very useful to test notification workflows, however, sometimes the HTML formatting we use may not show up the same in Papercut-SMTP as it does in e-mail applications like MS Outlook. To solve this, I have made a simple solution available to the community that takes the content from Papercut-SMTP and forwards it via a real SMTP relay to a single mailbox. This way all e-mails, regardless of who they are addressed to, get forwarded to a mailbox of your choosing so you can see them directly within Outlook and not have to open the SCSM server to view test e-mails.
You can grab a copy of this simple script on Github here. And if you have any questions, feel free to reach out to me at firstname.lastname@example.org.