(→Unix generique) |
(→Unix generique) |
||
| Ligne 6 : | Ligne 6 : | ||
mail d * | 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,<br> | ||
| + | <br> | ||
| + | Veuillez trouver ci-joint le suivi des fichiers vers SAP<br> | ||
| + | <br> | ||
| + | fichier contenant : <br><br>" | ||
| + | while read ligne | ||
| + | do | ||
| + | echo $ligne"<br>" | ||
| + | done < $Txt | ||
| + | echo "<br> | ||
| + | Cordialement<br> | ||
| + | <a href="mailto:expl-dapo.dsem-dex@laposte.fr">Exploitation Orleans DAPO/DSEM</a><br> | ||
| + | <a href="mailto:exploit-2.orl-dex@laposte.fr">Exploitation Orleans DORH</a><br> | ||
| + | </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 | ||
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