View Single Post
Old 09-26-2014, 09:05 AM
kirchenlo kirchenlo is offline
Join Date: Nov 2010
Posts: 195
kirchenlo has 15 reputation pointskirchenlo has 15 reputation points
Solution Confirmed

Hello All,

here is my solution to the issue with MS Office 365 and VMPro. First of all we all know that neither the IP Office nor the Voice Mail Pro server is actually able to send secure email natively via the MS Office 365 cloud service.

I was struggling around with this a whole day at a customer to find a working solutions. I want to share in my odysee to get it working with you all.

1st Solution / Use the MAPI instead of SMTP on Voicemail Pro Server

That was my first start point and I figured very fast out that MAPI is not at all easy to handle. I tried several MAPI clients (Outlook 2007 / Outlook 2010) none of them were able to sent the emails to the receiver. My issue with MAPI was that VMPro showed me that the message was successfully sent. See below trace out of the debug view.

23/09 16:52:58.732 vmprov5s (66,8) 75c, 730: < CMAPIImpl::SendEmail()
23/09 16:52:58.732 vmprov5s (19,8) 75c, 730: < CMAPIImpl::SendEmail()
23/09 16:52:58.733 vmprov5s (14,9) 75c, 730: Successfully sent email to
23/09 16:52:58.733 vmprov5s (14,9) 75c, 730: < EMailerThrd::SendRequestUsingEMAPI()
23/09 16:52:58.733 vmprov5s (14,9) 75c, 730: emailerThrd - SendRequest succeeded for 69\MSG00016

Time was passing quickly as de-installing/installing of VMPro and Office takes a while. The above shows that there was no doubt that VMPro is working but the MAPI client did not do his job by sending the mail on behalf to. The only way it was sending the mail was opening the outlook client and then you could see in the outlook outbox 3-4 messages that have not been yet sent. These messages were sent as soon as outlook was started and synchronizing the mail account. I tried several forums to find a workaround or patch for that behavior, finally I gave up the MAPI client.

I think that these Outlook issues are treated to MS security settings, but unfortunately I couldnít figure out the blocking point.

2nd Solution / Install a SMTP Relay

I installed the hMail server (5.4 and 5.5) but after the configuration I figured out that it does not support TLS for the connection MS Office 365. So wrong road to success.

3rd and Working Solution / Install STunnel

I use now STunnel which maps the local standard mail ports via a windows service to the secure mail ports used by MS Office 365. STunnel is a multi OS freeware tool. Via the below link you will find informationís about the STunnel and the required setup.

After installing STunnel as a service on the same windows server which is running the VMPro server you will need to setup STunnel configuration file accordingly. In this file you can see that the standard ports for email (25/110) are mapped to the cloud based service.


# Stunnel configuration file for Office 365 SMTP and POP3
# Author: MessageOps,
client = yes
output = stunnel-log.txt
[POP3 Incoming]
accept = 110
connect =
[SMTP Outgoing]
protocol = smtp
accept = 25
connect =

On your application you must set the SMTP server to the IP address of the server/PC running STunnel (must not be the same machine as VMPro, it can be any machine within the network) and you need the use in clear the credentials of the MS Office 365 exchange account.
Via the below links you will get a detailed idea how STunnel works.

In the case that you will have such a scenario this will help you that you do not lose too much time, like me. It is a little tricky when your application does not support TLS/SSL. I assume that in future all major suppliers of such applications will adapt their products that maybe in future no more workarounds are needed. For the moment this is for me the only way to get it properly working via MS Office 365.

Regards and have fun.
Reply With Quote