You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-06-22 15:41:17

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Send notification queue

Hello, I use GLPI in XAMPP and I'm having problems sending emails from the notification queue. I searched some solutions here in the forum and I couldn't solve the problem.
I was instructed to create a script with this information:

php C:\xampp\htdocs\helpdesk\front\cron.php --force mailgate
php C:\xampp\htdocs\helpdesk\front\cron.php --force queuedmail

but it doesn't work either. Can anyone help me?

Offline

#2 2023-06-26 15:42:39

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Send notification queue

too little information.

First of all: is email follow up configuration done? Does "send test mail" work?

Offline

#3 2023-06-26 19:02:10

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

Hello, the settings are ok, I can send the emails from the queue manually, the problem is that it does not send automatically.

When I select the email and click send it works. The problem I believe is in cron jobs, it does not make automatic submissions I need to do it manually.

Offline

#4 2023-06-27 16:27:49

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Send notification queue

Did you put the cron script inside windows tasks?
Is "automatic actions" -> "queuednotification" set to "cli" and "scheduled"?

Offline

#5 2023-07-05 14:59:59

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

Hello Kaya 84, thank you very much for your attention and I apologize for the delay in getting back to you.

I configured the windows task scheduler, the task is completed and the result of the last run is reported with the code (0x1).

Even if I run the script manually, the emails from the queue are not sent.

I use GLPI in XAMPP on windows server, the script I'm using is the one below:

php C:\xampp\htdocs\helpdesk\front\cron.php -- force mailgate
php C:\xampp\htdocs\helpdesk\front\cron.php -- force queuedmail

Could you help me, please?

Offline

#6 2023-07-10 11:58:53

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Send notification queue

First:
Try in console the command.
And post the output
Second:
" -- force " there is a blank space between -- and force. The parameter is without blank space " --force"

Offline

#7 2023-07-12 14:32:01

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

Hello, I did the test as requested and the console reported me the following messages:

"C:\xampp\php>php C:\xampp\htdocs\helpdesk\front\cron.php --force mailgate
Cannot load Zend OPcache - it was already loaded

C:\xampp\php>php C:\xampp\htdocs\helpdesk\front\cron.php --force queuedmail
Cannot load Zend OPcache - it was already loaded"

I checked the notifications queue and the emails were not sent hmm

Offline

#8 2023-07-12 14:37:41

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Send notification queue

Go in notification queue, opene one of them. Go to action (top right) and click send.
Is the notification sent?

In glpi -> automatic actions -> queuded notification is seto to CLI, scheduled ?
What is written in "next run " ? and "last run"?
Has the user a valid email address ? and "Notifications for my changes" is set to yes?

Offline

#9 2023-07-12 19:01:52

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

Go in notification queue, open one of them. Go to action (top right) and click send.
Is the notification sent? YES

In glpi -> automatic actions -> queuded notification is set to CLI, scheduled ? YES

What is written in "next run" ? AS SOON AS POSSIBLE (07/12/2023 09:24)

and "last run"?     12-07-2023 09:23 (I clicked the "run" button earlier)

Has the user a valid email address ? YES   


and "Notifications for my changes" is set to yes? I didn't understand


When I go to the notification queue and select an email, I click send, the email is sent normally, the problem is in the automatic task itself hmm

Offline

#10 2023-07-14 13:57:33

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Send notification queue

Try without params.
Only:
C:\xampp\php>php C:\xampp\htdocs\helpdesk\front\cron.php

And post output and logs!..

Offline

#11 2023-07-14 22:08:03

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

Hello, when running this command at the prompt it worked normally.

But when I double click to run the script it doesn't work. How can I create the script?

Offline

#12 2023-07-17 14:56:50

jonatassilva5
Member
Registered: 2022-12-02
Posts: 21

Re: Send notification queue

I got it, it worked. I needed to create the following script below:

CD..
CD..
cd xampp
cd php
php C:\xampp\htdocs\helpdesk\front\cron.php

Thank you for your help!

Offline

Board footer

Powered by FluxBB