Trying to use an exchange 2016 server as outgoing mail server

Hello all,

I have a fresh installation of SuiteCRM 7.9.12 on Ubuntu-Server using Apache, mysql, and php-7

I’ve worked with SuiteCRM before but was not an expert by any means. This is not a production environment - at least not the website.

In my environment I have a Microsoft Exchange 2016 Server, which i’d like to use as the email server for SuiteCRM (I don’t want my web server to also be an email server if possible).

The exchange server and web server have separate public IP addresses, and different domain names as well (although located in the same geographical location).

No matter what I try I can’t seem to get the email set up in SuiteCRM like this. Has anyone had a similar environment in which they made this work? I’ve gotten a few different errors but for the most part it’s always “Error:SMTP connect() failed” and sometimes it doesn’t error out at all but says “one moment please” forever.

I’ve set up the receive connector in Exchange to allow the web server’s IP address for anonymous connections, and I’m pretty sure I did all that right but I’m open to suggestions there as well.

Any insight is appreciated. Thank you

I’ve recently put in some changes to the SMTP error handling code:

https://github.com/salesagility/SuiteCRM/pull/5077

This makes debugging the kind of issue you’re having much, much easier. You’ll be able to see exactly what the server is complaining about.

This should be coming out VERY soon, possibly even tomorrow or early next week.

1 Like

Since I posted, I found this in my php error.log (which I knew to enable based on the “2 log files” article you linked to in a different post - TYVM)

[14-Feb-2018 16:30:56 America/Los_Angeles] PHP Fatal error: require_once(): Failed opening required ‘extras/ntlm_sasl_client.php’ (include_path=’/var/www/html/mydomain.com/public_html/suitecrm:/var/www/html/mydomain.com/public_html/suitecrm/include/HTMLPurifier/standalone:/var/www/html/mydomain.com/public_html/suitecrm/include/…:.:/usr/share/php’) in /var/www/html/mydomain.com/public_html/suitecrm/include/phpmailer/class.smtp.php on line 491

Not sure if you can make sense of it, but it seems to occur any time I attempt to send a test email in the admin> email settings> outgoing mail configuration.

Anyway, thank you for your contribution

That’s strange. I guess nobody ever needed that file before, because SuiteCRM is not including it…

You can grab it from the PHPMailer GitHub here:

https://raw.githubusercontent.com/PHPMailer/PHPMailer/5.2-stable/extras/ntlm_sasl_client.php

Try saving that as
/var/www/html/mydomain.com/public_html/suitecrm/include/phpmailer/extras/ntlm_sasl_client.php
in your server and see what happens next.

I will be pushing for SuiteCRM to do an upgrade to its bundled PHPMailer soon, to version 6.0, which doesn’t seem to use this “extras” directory anymore, so hopefully the file won’t be missed in the future.

But tell me how it goes for you so I can evaluate this a bit better. Thanks

Thanks PGR, that did stop the error, but hasn’t fixed the underlying issue. I’ve never actually gotten SuiteCRM to work with an Exchange server so I’m thinking I might have the receive connector set up wrong - although I’ve set them up for other apps on the network, maybe it’s different somehow. I’ll research that while I wait for those changes in SMTP error handling.

Confirmed this is not a SuiteCRM issue, but thank you for attempting to help. I know this because when troubleshooting, I put the web server on the same network as the exchange server and the tests went through fine to both internal and external email addresses. This tells me it’s likely the firewall in front of exchange or some misconfig in the receive connector.

Thanks pgr, you are awesome for the swift responses and you certainly know your stuff

This is a problem that I cant seem to fix as well Sir. Any new info on the suitecrm 8.2 version?
Chris

I think the main question now for anything related to Microsoft email is: when will the changes made to SuiteCRM 7.13 make their way into the v8 branch?

It might not be a simple question, because much of it was UI work, and the UI is completely different in the two branches. But still I expect that the Microsoft support is not something they’ll want missing from v8, so eventually it will get there.