Page 1 of 1

After Update no email function

Posted: Tue Jul 19, 2022 1:47 pm
by BLECH
Hi,
today i tried to update my HESK version from 3.2.5 to 3.3.1

The update itself worked well but after that i can't send email anymore.

When i've create a ticket there appears an error:

Could not send email notifications. Could not sent the message to:

The Debug mesage give me this informations:

2022-07-19 13:23:25 SERVER -> CLIENT: 220 BL-EXC.bl.local Microsoft ESMTP MAIL Service ready at Tue, 19 Jul 2022 15:23:25 +0200<br>
2022-07-19 13:23:25 CLIENT -> SERVER: EHLO helpdesk.blechwaren-limburg.de<br>
2022-07-19 13:23:25 SERVER -> CLIENT: 250-BL-EXC.bl.local Hello [XX.XX.XX.XX]250-SIZE 37748736250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-X-ANONYMOUSTLS250-AUTH NTLM250-X-EXPS GSSAPI NTLM250-8BITMIME250-BINARYMIME250-CHUNKING250 XRDST<br>
2022-07-19 13:23:25 CLIENT -> SERVER: STARTTLS<br>
2022-07-19 13:23:25 SERVER -> CLIENT: 220 2.0.0 SMTP server ready<br>
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed<br>
2022-07-19 13:23:25 CLIENT -> SERVER: QUIT<br>
2022-07-19 13:23:25 SERVER -> CLIENT: <br>
2022-07-19 13:23:25 SMTP ERROR: QUIT command failed: <br>
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed<br>


Do you have any ideas whats wrong with my system?
After a rollback everything works well again.

:(

BR
Alex

Re: After Update no email function

Posted: Tue Jul 19, 2022 3:59 pm
by Klemen
This happens because either your server doesn't have updated root SSL certificates or the mail server doesn't have a valid SSL certificate.

The correct solution is to check with your server admin and make sure OpenSSL (which is not part of Hesk but server-side software) can validate server certificates.

The not-recommended work-around for 3.3.1 is to:
1. download and install Notepad++
2. open file /inc/email_functions.inc.php in Notepad++
3. find line

Code: Select all

$mailer->Timeout = $hesk_settings['smtp_timeout'];
4. just below that line add

Code: Select all

$mailer->SMTPOptions = array(
  'ssl' => array(
      'verify_peer' => false,
      'verify_peer_name' => false,
      'allow_self_signed' => true
  )
);
5. save, upload and test

Re: After Update no email function

Posted: Wed Jul 20, 2022 11:30 am
by BLECH
Thank you for your answer.

For a first step i tried to change the email_function file.

After that i've got a new failure :(

2022-07-20 11:00:45 SERVER -> CLIENT: 220 BL-EXC.bl.local Microsoft ESMTP MAIL Service ready at Wed, 20 Jul 2022 13:00:45 +0200<br>
2022-07-20 11:00:45 CLIENT -> SERVER: EHLO helpdesk.blechwaren-limburg.de<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 250-BL-EXC.bl.local Hello [XX.XX.XX.XX]250-SIZE 37748736250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-X-ANONYMOUSTLS250-AUTH NTLM250-X-EXPS GSSAPI NTLM250-8BITMIME250-BINARYMIME250-CHUNKING250 XRDST<br>
2022-07-20 11:00:45 CLIENT -> SERVER: STARTTLS<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 220 2.0.0 SMTP server ready<br>
2022-07-20 11:00:45 CLIENT -> SERVER: EHLO helpdesk.blechwaren-limburg.de<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 250-BL-EXC.bl.local Hello [XX.XX.XX.XX]250-SIZE 37748736250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH NTLM LOGIN250-X-EXPS GSSAPI NTLM250-8BITMIME250-BINARYMIME250-CHUNKING250 XRDST<br>
2022-07-20 11:00:45 CLIENT -> SERVER: AUTH LOGIN<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2022-07-20 11:00:45 CLIENT -> SERVER: [credentials hidden]<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2022-07-20 11:00:45 CLIENT -> SERVER: [credentials hidden]<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2022-07-20 11:00:45 SMTP ERROR: Password command failed: 334 VXNlcm5hbWU6<br>
SMTP Error: Could not authenticate.<br>
2022-07-20 11:00:45 CLIENT -> SERVER: QUIT<br>
2022-07-20 11:00:45 SERVER -> CLIENT: 334 UGFzc3dvcmQ6<br>
2022-07-20 11:00:45 SMTP ERROR: QUIT command failed: 334 UGFzc3dvcmQ6<br>
SMTP Error: Could not authenticate.<br>


I've tried it with user and password aswell.
Can you give me a hint what to do, or how to update the root SSL certificate in XAMPP?

BR
Alex

Re: After Update no email function

Posted: Wed Jul 20, 2022 6:52 pm
by Klemen
SMTP ERROR: Password command failed
This new error means the password is either wrong or your mail client requires an "app password" and you cannot login using the account password - check with your email provider.


I don't know for XAMPP, but something similar to the WAMP solution should do the trick:
viewtopic.php?f=13&t=6060&p=25866&hilit ... pem#p25866

Re: After Update no email function

Posted: Wed Aug 10, 2022 11:15 am
by BLECH
But it's a new Server System and XAMPP is the newest version aswell.

How could the certificate not valid?
And why is it only in Version 3.3.X

BR
Alex

Re: After Update no email function

Posted: Wed Aug 10, 2022 12:35 pm
by PetrM
Hello, some email notifications are not working after the update. After creating a new ticket, the e-mail goes out fine, but when responding, an error appears: "Could not send email notifications. Please notify webmaster at....."

Re: After Update no email function

Posted: Wed Aug 10, 2022 12:46 pm
by Klemen
BLECH wrote: Wed Aug 10, 2022 11:15 am But it's a new Server System and XAMPP is the newest version aswell.

How could the certificate not valid?
And why is it only in Version 3.3.X

BR
Alex
Perhaps it's just not configured properly, beats me. Did you try as suggested? As of version 3.3.x we use a new emailing library which checks certificates by default (which is the right thing to do). Also, as of 3.3.2 you can now turn off certificate validation in the settings.

Re: After Update no email function

Posted: Wed Aug 10, 2022 12:48 pm
by Klemen
PetrM wrote: Wed Aug 10, 2022 12:35 pm Hello, some email notifications are not working after the update. After creating a new ticket, the e-mail goes out fine, but when responding, an error appears: "Could not send email notifications. Please notify webmaster at....."
DEBUG:
SMTP Error: The following recipients failed: petr.mejsnarx@havex.cz: Mailbox <petr.mejsnarx@havex.cz> does not exist<br>
Hard to say without access to the help desk, but the SMTP error does not lie. Perhaps the email is misspelled in the ticket?

Re: After Update no email function

Posted: Thu Aug 11, 2022 5:47 am
by PetrM
Hello, sorry for yesterday's question, I really wrote myself in the email address.
Still, I'm having trouble sending notifications.
After creating a new ticket, the e-mail with the notification will go to two addresses (who created the ticket and to whom the ticket is assigned).
When anyone writes a reply in the HESK app, an e-mail notification is sent only to the person who created the ticket. To whom the ticket is assigned, the e-mail notification will not be sent
I checked the notification settings in the user and it has everything checked.
In the log of the e-mail server, it can be seen that HESK sends two e-mails when creating a ticket, and only one e-mail when responding (the e-mail filter excluded it).

Re: After Update no email function

Posted: Thu Aug 11, 2022 8:21 am
by Klemen
That's how it's designed, yes.

When a ticket is submitted, both the staff and the customer are notified.

When staff replies, only the customer is notified.

When customer replies, only the staff is notified.

Here's an article explaining how it works:
https://www.hesk.com/knowledgebase/?article=94

Re: After Update no email function

Posted: Thu Aug 11, 2022 9:11 am
by PetrM
OK
We have customers, there it works as you describe.
But I have a colleague with whom we share tasks.
When a colleague with access to HESK enters a new ticket, an email comes to both of them.
When I add an answer to the ticket, the e-mail comes to me as a customer.
I hadn't thought of that, but it makes sense.

I found in the email server log that the same behavior was occurring before the update, I just didn't notice it.
Sorry for the unnecessary question.