Mise en place notifications mails

Problèmes d'installation de Maarch
Installation issues

Mise en place notifications mails

Message par vcollette » 01 Août 2016, 10:35

Bonjour,

Après avoir installé avec succés Maarch Courrier sur une machine tournant sous debian, tout marche impeccablement sauf le système de notification mail. Je pense avoir correment configuré le mailer:

/var/www/html/maarch_courrier/modules/notifications/batch/config/config.xml
Code : Tout sélectionner
    <MAILER>
        <path_to_mailer>/apps/maarch_entreprise/tools/mails/htmlMimeMail.php</path_to_mailer>
        <path_to_phpmailer>PHPMailer_v5.1</path_to_phpmailer>
        <type>smtp</type>
        <smtp_host>ssl://smtp.gmail.com</smtp_host>
        <smtp_port>465</smtp_port>
        <smtp_user>courrierRT@gmail.com</smtp_user>
        <smtp_password>******</smtp_password>
        <smtp_auth>true</smtp_auth>
        <smtp_secure>ssl</smtp_secure>
        <charset>utf-8</charset>
        <domains>gmail.com</domains>
        <x-mailer></x-mailer>
        <mailfrom>courrierRT@gmail.com</mailfrom>
    </MAILER>


Néanmoins aucun mail ne semble partir (je crée un courrier et je met un utilisateur avec une adresse mail vlaide dans la liste de diffusion) , quand j'exécute le script nct-ncc-and-anc.sh j'obtiens l'output suivant:

Code : Tout sélectionner
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
Mon Aug  1 11:17:59 2016,809 [9168] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
Mon Aug  1 11:17:59 2016,809 [9168] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id NCT][process_event_stack]
Mon Aug  1 11:17:59 2016,811 [9168] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
Mon Aug  1 11:17:59 2016,812 [9168] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 6][process_event_stack]
Mon Aug  1 11:17:59 2016,814 [9168] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
Mon Aug  1 11:18:00 2016,005 [9171] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
Mon Aug  1 11:18:00 2016,006 [9171] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id NCC][process_event_stack]
Mon Aug  1 11:18:00 2016,008 [9171] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
Mon Aug  1 11:18:00 2016,008 [9171] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 3][process_event_stack]
Mon Aug  1 11:18:00 2016,010 [9171] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
Mon Aug  1 11:18:00 2016,208 [9174] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
Mon Aug  1 11:18:00 2016,209 [9174] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id ANC][process_event_stack]
Mon Aug  1 11:18:00 2016,214 [9174] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
Mon Aug  1 11:18:00 2016,217 [9174] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 7][process_event_stack]
Mon Aug  1 11:18:00 2016,219 [9174] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
Mon Aug  1 11:18:00 2016,417 [9177] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
Mon Aug  1 11:18:00 2016,417 [9177] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id AND][process_event_stack]
Mon Aug  1 11:18:00 2016,419 [9177] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
Mon Aug  1 11:18:00 2016,419 [9177] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 8][process_event_stack]
Mon Aug  1 11:18:00 2016,421 [9177] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
Mon Aug  1 11:18:00 2016,618 [9180] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
Mon Aug  1 11:18:00 2016,619 [9180] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id RED][process_event_stack]
Mon Aug  1 11:18:00 2016,621 [9180] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
Mon Aug  1 11:18:00 2016,621 [9180] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 9][process_event_stack]
Mon Aug  1 11:18:00 2016,622 [9180] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]


Si j'ai bien compris, cela m'indique "No event to process" or, j'ai bien ajouter des courriers avec liste de diffusion.

Résultat de commandes: php5 process_event_stack.php -c config/config.xml -n NCT

Code : Tout sélectionner
PHP Warning:  fopen(logs/process_event_stack/2016-08-01_11-23-33.log): failed to open stream: Permission denied in /usr/share/php/Maarch_CLITools/FileHandler.php on line 25
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:23:33 2016,998 [9266] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_NOTIFICATIONS][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:23:33 2016,998 [9266] INFO loggerTechnique - [Script][OK][notifications][UP][Loading configuration for notification id NCT][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:23:34 2016,000 [9266] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EVENTS][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:23:34 2016,000 [9266] INFO loggerTechnique - [Script][OK][notifications][UP][Loading events for notification sid 6][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:23:34 2016,002 [9266] INFO loggerTechnique - [Script][OK][notifications][UP][No event to process][process_event_stack]


php5 process_email_stack.php -c config/config.xml

Code : Tout sélectionner
PHP Warning:  fopen(logs/process_email_stack/2016-08-01_11-25-29.log): failed to open stream: Permission denied in /usr/share/php/Maarch_CLITools/FileHandler.php on line 25
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
PHP Notice:  Undefined offset: 0 in /var/www/html/maarch_courrier/modules/notifications/batch/batch_tools.php on line 121
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:25:29 2016,781 [9295] INFO loggerTechnique - [Script][OK][notifications][UP][STATE:LOAD_EMAILS][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:25:29 2016,783 [9295] DEBUG loggerTechnique - [Script][OK][notifications][UP][SQL query:SELECT * FROM notif_email_stack WHERE exec_date is NULL][process_event_stack]
PHP Warning:  fprintf() expects parameter 1 to be resource, boolean given in /usr/share/php/Maarch_CLITools/FileHandler.php on line 42
Mon Aug  1 11:25:29 2016,783 [9295] INFO loggerTechnique - [Script][OK][notifications][UP][No e-mail to process][process_event_stack]


Si vous avez une idée, je suis preneur, merci d'avance.
vcollette
 
Message(s) : 1
Inscription : 01 Août 2016, 09:56

Re: Mise en place notifications mails

Message par leakim971 » 13 Nov 2017, 19:51

il faut se positionner dans le répertoire du script process_event_stack.php qui contient un répertoire logs OU bien il vous faut se répertoire logs et le sous répertoire process_event_stack. Vous pourrez alors vérifier les logs et identifier votre erreur.
Il se peut qu'il y ait tout simplement un fichier avec l'extension .lck qui bloque le script... Il suffit de le supprimer...
leakim971
 
Message(s) : 5
Inscription : 13 Nov 2017, 19:45


Retour vers Installation

Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 1 invité

cron