mon script php : testenvoi.php situé sur le serveur dans un repertoire :/home/testmail/
#!/usr/local/bin/php
mail("test@test.com","sujet","corps du sujet");
ma crontab :
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
# vpopmail
40 * * * * root /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null
# envoi (…)