After Update no email function

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
BLECH
Posts: 3
Joined: Tue Jul 19, 2022 1:26 pm

After Update no email function

Post 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
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: After Update no email function

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
BLECH
Posts: 3
Joined: Tue Jul 19, 2022 1:26 pm

Re: After Update no email function

Post 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
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: After Update no email function

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
BLECH
Posts: 3
Joined: Tue Jul 19, 2022 1:26 pm

Re: After Update no email function

Post 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
PetrM
Posts: 4
Joined: Fri Jan 14, 2022 12:00 pm

Re: After Update no email function

Post 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....."
Last edited by PetrM on Wed Aug 10, 2022 12:48 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: After Update no email function

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: After Update no email function

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
PetrM
Posts: 4
Joined: Fri Jan 14, 2022 12:00 pm

Re: After Update no email function

Post 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).
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: After Update no email function

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
PetrM
Posts: 4
Joined: Fri Jan 14, 2022 12:00 pm

Re: After Update no email function

Post 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.
Post Reply