IMAP is for the Unified Messaging... meaning your voicemail and email are synced... For example, if you delete an email that is a voicemail, the message on the phone would be deleted as well. This requires a direct IMAP connection to the email server and entering the credentials for each user (or they enter it in the web portal of the 3300), and cannot use a relay server... I have never done this with embedded VM on the MiVB, but have done it multiple times on the MiVoice Office 250.
The Mitel 3300 does not support encrypted or authenticated email servers for regular voicemail to email, you must use a relay server... You can supply your own, or we often use Mitel Standard Linux/Mitel Border Gateway with no license and just use it's email server to act as a "relay". In this case, the MSL server *IS* the email server, and will send emails directly to recipients so no setup specific to O365 is required.