Howdy ya'll, I'm having some issues with our sending email config.
osTicket Version 1.16 in Windows IIS
PHP Version 8.1.2
The system logs yield:
Unable to email via php mail function: myemail@mygoogledomain.gov mail() returned failure.
When I try to configure "sending email via SMTP" settings, When I hit save I get the failure:
authentication failure [SMTP: STARTTLS failed (code 220, responseL 2.0.0 Ready to start TLS)
The settings I've configured are as follows:
Status: Enable
Hostname: smtp.gmail.com (I've also tried ssl://smtp.gmail.com and tls://smtp.gmail.com)
Port; 587
Auth req: yes
Header Spoofing: Allow (I've also tried unticking this box)
Might be worth saying that our IMAP fetching settings using the same credentials work just fine, so it's def not a credentials issue.
(SMALL EDIT FOR CLARITY- we also have less secure apps enabled for this address in our Gsuite console)
Operating System: Windows server 2019
I've configured both the proxy and the firewall to allow through any blocked connections that it showed when I ran wireshark. At this point I'm a little lost and I'd super appeciate anyone that has any ideas. End goal is to have a ticket system that can send an email- however that may happen 🙂

Maybe I'm missing something silly but I appreciate ya'lls help 🙂

    carterspear
    it's should be working, are you using 2FA? if so you will need to use an app password
    also, I am not sure if PHP ver. 8.1.2 supported yet, it supports up to 8.0

      ramrajone no 2 factor is enabled on this system (though i might do that in the near future)... but that PHP thing is a good pointer! I'll see if 8.0 works a little better.....

        carterspear No dice :/ reverting osTicket to use PHP version 8.0 didn't solve the problem. Appreciate the suggestion though!

        If you are authenticating SMTP with a specific email address / password, I believe you need to Enable Less Secure Apps for that account: https://support.google.com/accounts/answer/6010255?hl=en

        Alternatively since it appears you are a Google Workspace customer, if your osTicket install has a static IP you could allow-list it for the SMTP Relay Service to send without authentication: https://support.google.com/a/answer/176600?hl=en

        On the PHP version note, I had a plugin problem that was resolved by downgrading to PHP 8.0. The Release notes for osTicket 1.16 specified PHP 8.0 or higher, but it was changed in the osTicket 1.16.1 release to specify 8.0 only.

          kevinmcox We do have less secure apps enabled- sorry, I totally forgot to put that in the original post hah
          Our ticket server does have a static IP- but it's an internal only IP. We have our network under a super heavy lockdown and all traffic at this time goes through the proxy server- and google routing settings don't seem to like that 😅

          My next step to solve this was to try assigning it an external IP, at which point we'd need to super lock-down the ticket server itself which would be a pain but if that's how it has to be, so be it 😁

            carterspear Google only cares about the IP address making the connection to the mail server. So you might be able to just allow-list your proxy server for relay.

            Howdy everyone- so now, google routing settings are configured to accept traffic sending mail from the proxy, proxy is showing no blocked traffic, and same is true of the firewall. Still no dice. Anyone have any other pointers?

            It's funny, I have SMTP working with no problem but I can't get osTicket to check for email from a Google account to save my life right now! Sounds like you are in the opposite position.

            @kevinmcox @carterspear

            I have IMAP and SMTP working with no issues with a gmail account. Make sure you are using v1.16.1 and PHP 8.0, have a working cron job (make sure the cron job is running PHP 8.0), and have enabled mail fetching in the system settings.

            Also, when you installed PHP 8.0 did you install all the extensions like PHP-imap?

            Also, make sure you apply all the latest patches:

            Cheers.

            I'm running into a similar issue with SMTP not connecting. IMAP connects without issue.

            Error Message: Failed to connect to smtp.google.com:587 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]

            osTicket 1.16 on Ubuntu
            PHP 8.0.16

            Is there the full list of extensions required for php? I rolled back from 8.1 to 8.0 per this thread's advice and reinstalled many of them but may be missing something.

            @WestonC

            First upgrade to v1.16.1. Secondly, apply the following patches and retest:

            If all else fails contact your mail provider to see why IMAP/SMTP is failing to connect. They have the logs and should be able to tell you easily.

            Cheers.

            Write a Reply...