Flyerenv

12 avril 2006

Envoyer un mail HTML en Shell

Vous avez un super script CGI qui produit une super page HTML. Vous souhaiter envoyer cette page HTML par mail. Voici comment faire:


( echo "From: michel.martin@laposte.net"
echo "To: odette.martin@laposte.net"
echo "Subject: Le menu du soir"
echo "Content-type: text/html"
echo
/var/www/cgi-bin/mon_super_script.cgi | tail +3
) | /usr/sbin/sendmail -oi -t

2 Comments:

Enregistrer un commentaire

<< Home