Unix generique

De system.co.free.fr.

Unix generique


supprimer la totalité les mails de mailx:

mail d *

envoyer un mail en html avec pièce jointe avec sendmail:

( echo 'To: '$Mail_Dest

echo 'Subject: '$Mail_Sujet
echo 'MIME-Version: 1.0'
echo 'Content-Type: multipart/mixed; boundary="-q1w2e3r4t5"'
echo
echo '---q1w2e3r4t5'
echo 'Content-Type: text/html'
echo 'Content-Disposition: inline'

echo ' <HTML> <BODY style="font-family:Verdana;font-size:0.8em"> ' echo "Bonjour,

Veuillez trouver ci-joint le suivi des fichiers vers SAP

fichier contenant :

"

       while read ligne
       do
       echo $ligne"
" done < $Txt

echo "
Cordialement
<a href="mailto:expl-dapo.dsem-dex@laposte.fr">Exploitation Orleans DAPO/DSEM</a>
<a href="mailto:exploit-2.orl-dex@laposte.fr">Exploitation Orleans DORH</a>
</BODY> </HTML>"

echo '---q1w2e3r4t5'

echo 'Content-Type: application/octet-stream"'
echo "Content-Transfer-Encoding: quoted-printable"
echo 'Content-Disposition: attachment; filename="'$(basename $Txt)'"'
echo
cat $Txt
echo '---q1w2e3r4t5--'
) | /usr/lib/sendmail $Mail_Dest
Outils personnels