sakbari

You can apply my DIFF file above. If you don't know how to apply a diff file you can Google "how to apply a diff file"; it's very simple. Once the changes are applied you should restart the webserver and/or PHP-FPM (to ensure nothing is being cached) and retest.

Cheers.

Where to change the setting in version 1.18

I changed the following lines and certificate verification was disabled
// Set the connection settings
$this->connection = [
'host' => $host,
'port' => $port,
'ssl' => $ssl,
'protocol' => strtoupper($account->getProtocol()),
'name' => self::get_hostname(),
'use_complete_quit' => false,
'novalidatecert' => true
];
oraz private function buildOptions(AccountSetting $setting) {
// Dont send 'QUIT' on __destruct()
$config = ['use_complete_quit' => false,'novalidatecert' => true];
$connect = $setting->getConnectionConfig();
$auth = $setting->getAuthCredentials();

4 months later

Hello
This is my /includes/class.mail.php, where do I change this in osTicket version 1.18 for the emails to work, I am using Gmail

    6 days later

    KevinTheJedi Apparently after setting up the 0 Auth for Google, everything worked fine for a few days, (The Token Key Expires today, as per Screenshot) then the same error started happening again, also during ticket creation, It takes even 3-5 Minutes to submit a ticket, anything i should double check?

    asadler

    Access Tokens expire quickly (same day) and when expires we use the Refresh Token to refresh and get a new Access Token.

    What error are you talking about specifically?

    If it takes that long on ticket creation it could be different things but it sounds like it’s taking awhile to send an email.

    Cheers.

      KevinTheJedi I am not yet familiar with the Refresh Tokens, how do I go about it and what steps can I take to get the refresh tokens? I realized that it takes a while to send an email.!

        asadler

        The refresh token is already retrieved when you authorize the email. Then every time the access token is refreshed automatically the refresh token is updated as well.

        Cheers.

          14 days later

          KevinTheJedi Thanks for the feedback, however still the emails are not yet being received even when the tokens are updated! How do I proceed from There?


            When i do this, I run into the above error!

            asadler

            Ahh network unreachable is the error. Seems like that host or port is blocked on your server. You need to contact your server admin and/or hosting provider to have them look into why you cannot connect to that host and port from your webserver.

            Cheers.

            4 days later

            If you have a external web hosting company contact them like Kevin suggested.
            If you are running your own server (in house or in the cloud) you would want to check logs for any security software you are running on the host.

            Or if you have your own firewall it could also blocking.
            If you do, check firewall logs to see why its getting blocked.

            4 days later

            Hello,

            Unfortunately, we are facing the same issue with our osTicket installation (ubuntu VM):

            We cannot connect to the on-premises exchange mail server 2019 (contains trusted, third-party signed SSL certificate) through osTicket:

            because we get the exact same error:

            which changes when I add the tls:// prefix to the mail server name:

            I could not find anything related to the issue in the local log files (web server or php) and I have petitioned and waiting for the mail server logs.

            Not sure how to proceed regarding the SSL certificate, any help is welcome.

              8 days later