MailSim’s new REST interfaces


In addition to driving an Outlook 2013 client to test an Outlook-compatible email server, MailSim can now interact with an Office 365 user account to perform the same email and folder operations. The purpose for this addition is to showcase the ability to use REST to connect to, and interact with, the Office 365 service.

Note: As MailSim is open source, you are welcome to update the new code with your own ideas.

Also, MailSim’s REST providers can be used to test "man in the middle" network component(s) between the MailSim process and the Office 365 account, such as a network accelerator, a virus scanner, or a compliance enforcer.

Figure 1: MailSim updates for REST capability

MailSim calls the new Office 365 REST (Representational State Transfer) API to perform all existing MailSim operations: send and reply to email messages, create and move folders, and so forth. See the initial MailSim blog post for an example of each operation.

MailSim has two types of REST interfaces, one using direct HTTP calls to send and receive requests and responses, and one calling the Office 365 SDK to create and process request and response messages.

Note: To work with an Office 365 user account, MailSim must be registered with the Azure Active Directory for that account - see REST prerequisites.

New configuration file

There is only one change to the existing sequence and operations files: the DisableOutlookPrompts choice moved from sequence files to the new global Options.config file. There may be many sequence files and operations files, but there’s only one Options.config file. Options.config specifies the type of interface (Outlook Object Model, HTTP REST, or SDK REST) and the interface’s startup information, such as the Office 365 account’s username and password.

Further reading

All the new additions are described in the MailSim User Guide, primarily in the section titled Office 365 REST mode.

The code updates are described there in Under the hood.

Comments (0)

Skip to main content