Hello everybody!I have this error in the SMTP configuration with Office365:"authentication failure "My osTicket version is 1.9.4Does anyone know how to fix it?Attached screenshots for reference.Thank You!blankblankblank

001.JPG

002.JPG

003.JPG

Does your server require TLS?Do you actually have POP enabled on the server?Have you setup a transport rule to allow the web server to talk to the mail server if memory serves Exchange Management Console -> Server Configuration -> Hub Transport -> Receive Connector?

Hi!Thanks for the quick response!Yes, the server require TLS.Yes, actually have POP enabled and working.My e-mail server is on the cloud, with Office365 and the POP/SMTP server is Exchange Online, I do not have a microsoft exchange server.What I can do?I was thinking that maybe do lack an output connector on the configuration of Exchange Online...

We are also using Office365 cloud based with our 1.9.4 installation, but we have ours set up IMAP as shown in the attached, and we haven't had any trouble.

imap-osticket.JPG

This looks very similar to http://forum.osticket.com/d/discussion//smtp-errors-when-using-authenticationAnd I think I've finally found a solution.I mentioned in one of my posts that I'd had a suspicion something was wrong with the way the pear class is trying to negotiate with the smtp server. The problem seems to be with PEARI tried to replace            if (PEAR:($result = $this->_socket->enableCrypto(true, STREAM_CRYPTO_METHOD_TLS_CLIENT))) {                return $result;            } elseif ($result !== true) {                return PEAR:('STARTTLS failed');            }with//if (PEAR:($result = $this->_socket->enableCrypto(true, STREAM_CRYPTO_METHOD_TLS_CLIENT))) {            if (($result = $this->_socket->enableCrypto(true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) === false) {                return $result;            } elseif ($result !== true) {                return PEAR:('STARTTLS failed');            }and was able to save my SMTP configuration, and send e-mailsNot sure what to do now, I am reluctant to edit all the other functions manually to get rid of the PEAR: construction. Any ideas why it stops people from saving SMTP configuration?

I've pinged the devs to take a look at this thread.

blueyeguy:I enabled the IMAP + SSL configuration however it kept throwing error SMTP connection to Office 365 ... Thanks for responding!

mayka: I modified the code segment you mention to the file: include/pear/Net/SMTP.php Modified, let me save my SMTP configuration, however, still I can not send mail, in logs throws me the following error: Failed to September sender: user@domain.com Will you have any idea why this error occur?

To ntozier:There are a few threads on stackoverflow regarding PEAR:Can it have something to do with this?http://stackoverflow.com/questions/19248503/non-static-method-peariserror-should-not-be-called-staticallyPS I know the code as I used it does not make any sense as both if and elseif check the same thing but return different stuff, but in the original code it reaches the branch in which it raises the error 'STARTTLS failed', in mine it stops before that (because enableCrypto fails). To Francisco:It is too early to change anything, I did this just to play with it. It is not the working code you should be using

After spending more time on this, I think all my comments are crap, and do not help to solve the issue at all. There is no way to understand what's happening without any debug info. When I use sendmail (as shown in http://forum.osticket.com/d/discussion//smtp-errors-when-using-authentication), I can enable debugging, and this is what I get:14/12/02 01 ** Connecting to smtp.server.com14/12/02 01 ** Connected.14/12/02 01 << 220 smtp.server.com Microsoft ESMTP MAIL Service ready at Tue, 2 Dec 2014 01 +0000<EOL>14/12/02 01 >> EHLO localhost.domain.com<EOL>14/12/02 01 << 250-smtp.server.com Hello <EOL>250-SIZE 52428800<EOL>250-PIPELINING<EOL>250-DSN<EOL>250-ENHANCEDSTATUSCODES<EOL>250-STARTTLS<EOL>250-AUTH GSSAPI NTLM<EOL>250-8BITMIME<EOL>250-BINARYMIME<EOL>250 CHUNKING<EOL>14/12/02 01 ** Authenticating as user@domain.com14/12/02 01 >> STARTTLS<EOL>14/12/02 01 << 220 2.0.0 SMTP server ready<EOL>14/12/02 01 >> EHLO localhost.domain.com<EOL>14/12/02 01 << 250-smtp.server.com Hello <EOL>250-SIZE 52428800<EOL>250-PIPELINING<EOL>250-DSN<EOL>250-ENHANCEDSTATUSCODES<EOL>250-AUTH GSSAPI NTLM LOGIN<EOL>250-8BITMIME<EOL>250-BINARYMIME<EOL>250 CHUNKING<EOL>14/12/02 01 >> AUTH LOGIN<EOL>14/12/02 01 << 334 some base-64 data<EOL>14/12/02 01 >> more data<EOL>14/12/02 01 << 334 data<EOL>14/12/02 01 >> data<EOL>14/12/02 01 << 235 2.7.0 Authentication successful<EOL>14/12/02 01 >> MAIL FROM: <user@domain.com><EOL>14/12/02 01 << 250 2.1.0 Sender OK<EOL>14/12/02 01 >> RCPT TO: <maya.vybornykh@gmail.com><EOL>14/12/02 01 << 250 2.1.5 Recipient OK<EOL>The code in the SMTP.php seems to be doing the same, except that I am not quite sure why enableCrypto() fails, and what sendmail does to enable encryption, and whether it is needed at all.What I am trying to say is that the SMTP server is configured all right and works if sending e-mails using sendmail, and does not if using Net_SMTP. I am back to using sendmail :(

Hello mayka!That's right, modifying code or tuning the SMTP PEAR class can not be accomplished without debug info...I tried using sendmail as you suggested it via private message, however the detalle of the single sender is a real problem when you have different departements...So I started researching a bit on some software to help me and found a EMailRelay:http://emailrelay.sourceforge.net/With this software you can configure multiple instances and therefore multiple accounts of Office 365, where local servers have different TCP port and they do not require authentication ... that way you can set up POP or IMAP accounts to Office 365 and on the SMTP settings put your local address without authentication ... and have different departments with different email accounts!Thank you very much for your help!Greetings!

a month later

I too am having this same problem. I refuses to connect. With the on prem version of exchange I had no issues but Office 365 refuses to connect. I went to install this http://emailrelay.sourceforge.net/ and there seams to be no IMAP option only POP3 and SMTP. I need to be able to have OSTICKET DELETE the email after it processes it and I cant do this without IMAP. I need this middleware application to ace just as if I am connecting to the email  box directly. Is there anything OSTICKET can do to fix/force this to work normally this please????

10 days later

I have same problem on my office 365 set-up.. Any possible solution up to now with using 3rd party software? 

a year later

Did any find the solution?, We just recently shifted to office 365 and in email configuration, I have having the same error...authentication failure

15 days later

downgrade to php5.5 will solve issue. php5.6 is absolute shit with email related tasks.apt-get purge php* (debian systems)how to install php5.5http://askubuntu.com/questions/109404/how-do-i-install-different-upgrade-or-downgrade-php-version-in-still-supported

5 years later

Hola yo tengo un server osticket v1.9.8.1 apache 2.4.41 ubuntu, mysql 8.0.23version php 5.6.40-47, tengo problemas de funcionamiento con correo y cuenta O365, revise configutracion a nivel de panel control y todo igual con respecto a otro servidor que si esta funcionando, me pueden ayudar a ver si por comendo puedo detectar u validar correcto funcionamiento del servicio.-

osTicket 1.9.x is end of life and no longer supported.

Write a Reply...