Email Testing in IdentityIQ

IdentityIQ (IIQ) sends out a large number of emails to end users. These emails include everything from access request approvals, forwarded work items, certification notices, reminders, and more. It is crucial that developers test emails, and it may also be necessary for emails to be accessible during UAT testing and other scenarios. This guide will provide you tools you can use for email testing from your non-production IdentityIQ environments, and it will teach you how to set up IIQ to use the tools.

SMTP Tools

The following applications provide a quick and easy way for developers to test emails outside of simple text log files. When you are using either of these options, you must set up IIQ email configuration to use the SMTP option.

The configuration should look something like this:

Mailhog

Mailhog is an all-in-one SMTP server and web UI you can use to view email messages. You can easily install it on a SailPoint development/test server and set it up so that the web application can be accessed from a desktop.

Mailhog was mainly designed for Unix* based operating systems, and it was designed to be run in containers. To run Mailhog on Unix*, follow the readme in the GitHub repo.

If you want to run Mailhog on Windows, run the executable - this will run through the command prompt until you exit.

If you want to run Mailhog as a Windows service so it’s always running and receiving mail from IIQ, follow these steps:

  1. Download the latest Mailhog executable and place it somewhere like the root of the C Drive on the server where you want this service to run.
  2. Download NSSM.
  3. Open an elevated command prompt and navigate to where your NSSM executable is i.e. C:\nssm-2.24\win64.
  4. Run this command to install a Windows service that is tied to the Mailhog executable (using NSSM): 1nssm install MailHog C:\Users\patri\Downloads\MailHog_windows_amd64.exe.
  5. Open up Services on the Windows server and and start up your new Mailhog service. Ensure it starts successfully and set the Startup Type to Automatic.

PaperCut

PaperCut is an all-in-one SMTP server and Windows application you can use to view email messages. Unlike Mailhog, PaperCut doesn’t have a web UI, so developers and testers typically need to log into a server where the email viewer application is installed to launch the application. You can also install PaperCut as a Windows service so it is continuously receiving emails as well.

:bulb: NOTE: When you use any of these applications and their email viewers, they may display emails differently from the way the Outlook desktop application renders them.

Shared Mailbox (Exchange/O365)

Another option outside of the local SMTP server applications is to use a shared mailbox within your organization or client’s Exchange/Office 365 infrastructure. Work with a messaging team to have a new shared mailbox created - appropriate members will be able to access its content.

IIQ configuration should look something like the following image. The main difference would be that you must use the client’s SMTP relay server to forward all email communications to the shared mailbox address (Redirect to Email, instead of the SMTP option shown previously).

Once the mailbox is created, users can simply add the shared mailbox to their desktop Outlook client or their Outlook on the web:

Pros/Cons

Pros and Cons of each choice to help you make your decision.

Choice Pros Cons
Mailhog
  • Web UI accessible via specific port
  • Emails are addressed to email of identity receiving the email
  • Multiple operating systems supported
  • Application no longer in development
  • Needs to be installed on a server and usually network ports need to be opened
  • All users accessing same mailbox, can be confusing for testing
  • HTML emails may render differently than how they render in Outlook desktop client
PaperCut
  • Nice user interface to view emails
  • Emails are addressed to email of identity receiving the email
  • Windows OS only
  • Needs to be installed on a server
  • Must log onto server to view emails in UI
  • All users accessing same mailbox, can be confusing for testing
  • HTML emails may render differently than how they render in Outlook desktop client
Shared Mailbox
  • Users are familiar with using Outlook/O365 interfaces for UAT
  • HTML emails rendering in Outlook which most end users will probably be using at majority of organizations
  • Forwarding must be used, so emails are always addressed to the forwarding email address rather than the identity’s email
  • Users typically needed to be added to the mailbox to access it
  • All users accessing same mailbox, can be confusing for testing
4 Likes

I use mailhog on all my projects, so valuable. I have found that messages can add up and using a cron to call the delete messages API can help with performance or memory issues that can crop up.

4 Likes

I use mailhog all the time as well for sandboxes on my personal system. With Windows Subsystem for Linux and Docker/Podman, it’s as simple as spinning up a docker container when needed so you no longer need a separate server/VM.

1 Like

Great initiative Patrick Boston, Thanks for posting. Very helpful !

2 Likes

We use MailEnable as a captive SMTP endpoint. Works great for us, is updated and supports a Web UI plus POP/IMAP so it can be used with an Outlook client.

1 Like