Skip to content
Snippets Groups Projects
Commit 1d623093 authored by ines mkacher's avatar ines mkacher
Browse files

Update send_mail.md

parent 4440694c
No related branches found
No related tags found
2 merge requests!14Mise à jour arborescence,!131.0
Envoi de mails
==========================
# Envoi de mails
## Vérifications
*sendmail/batch/config/config.xml
*notifications/batch/config/config.xml
\ No newline at end of file
```bash
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/custom/cs_test/modules/notifications/batch/config$ ls -ltr
total 4
-rwxrwx--- 1 maarch maarch 2824 juil. 11 17:41 config.xml
```
```sh
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/custom/cs_test/modules/sendmail/batch/config/config.xml$ ls -ltr
total 4
-rwxrwx--- 1 maarch maarch 2824 juil. 11 17:41 config.xml
```
https://docs.maarch.org/gitbook/html/MaarchCourrier/18.04/guat/guat_exploitation/sendmail_notif.html
## Diagnostique
Dans le cas de non reception de mail, on peut faire le test en lançant le script d'envoi de mail :
```
/var/www/html/MaarchCourrier/custom/cs_carrieres/modules/notifications/batch/scripts$ ./sendmail.sh
```
Puis vérifier la log :
```shell
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/modules/notifications/batch$ ls -ltr
total 136
drwxrwx--- 6 maarch www-data 4096 mai 27 15:53 logs
```
```
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/modules/notifications/batch/logs/process_email_stack$ ls -ltr
total 4
-rw-r--r-- 1 maarch www-data 484 août 6 10:56 2019-08-06_10-55-26.log
```
```
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/modules/notifications/batch/logs/process_email_stack$ tail -f 2019-08-06_10-55-26.log
[2019-08-06 10:55:26] INFO 0 'Load xml config file:/var/www/html/MaarchCourrier/custom/cs_carrieres/modules/notifications/batch/config/config.xml'
[2019-08-06 10:55:26] INFO 0 'Load xml config file:/var/www/html/MaarchCourrier/custom/cs_carrieres/modules/notifications/batch/config/config.xml'
[2019-08-06 10:55:26] INFO 0 'An instance of the batch is already in progress. Waiting for the second try..'
[2019-08-06 10:56:26] INFO 109 'An instance of the batch is already in progress'
```
Le message 'An instance of the batch is already in progress' peut signifier qu'il y a des fichiers .lck qui bloquent l'execution du script :
```
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/modules/notifications/batch$ ls -ltr
total 136
drwxrwx--- 6 maarch www-data 4096 mai 27 15:53 logs
-rw-r--r-- 1 maarch www-data 1 mai 28 10:15 process_event_stack_error.lck
-rw-r--r-- 1 maarch www-data 1 mai 28 10:30 process_email_stack.lck
```
Supprimer les .lck puis relancer le script
```
maarch@MaarchIntegration1810:/var/www/html/MaarchCourrier/modules/notifications/batch$ rm *.lck
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment