# Envoi de mail avec PJ via mailx

**URL:** <https://www.debian-fr.org/t/envoi-de-mail-avec-pj-via-mailx/80728>\
**Category:** Support Debian\
**Created:** [Décembre 2, 2019, 11:40 UTC](https://www.debian-fr.org/t/envoi-de-mail-avec-pj-via-mailx/80728 "2019-12-02T11:40:53Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Décembre 4, 2019, 6:46 UTC](https://www.debian-fr.org/t/envoi-de-mail-avec-pj-via-mailx/80728/21 "2019-12-04T18:46:39Z")

</div>

la version bsd-mailx ne sait pas faire d’attachement, -a est uniquement un ajout dans l’en-tête  
pour avoir l’opion -A --attach j’ai remplacé bsd-mailx par mailutils

```auto
 mail -s "résul update-perso service" < /tmp/resul-opt-update-perso.txt -A /home/moi/Images/toto.png root@localhost

```

Dans mon cas si j’ajoute une photo comme pièce jointe le fichier texte est pris aussi comme pièce jointe alors que si le fichier texte est seul il est affiche directement mais c’est peut-être un pb thunderbird

Donc on est dépendant de l’outil installé [https://mailutils.org/manual/mailutils.html](https://mailutils.org/manual/mailutils.html)

---

<div class="post-metadata">

**Author:** ![tchup](https://www.debian-fr.org/user_avatar/www.debian-fr.org/tchup/32/4415_2.png) [@tchup](https://www.debian-fr.org/u/tchup)\
**Post date:** [Décembre 5, 2019, 8:37 UTC](https://www.debian-fr.org/t/envoi-de-mail-avec-pj-via-mailx/80728/22 "2019-12-05T08:37:21Z")

</div>

OK merci beaucoup @grandtoubab et @anon70622873 pour votre aide.  
Je vais donc revenir à MUTT…

[Page précédente](https://www.debian-fr.org/t/envoi-de-mail-avec-pj-via-mailx/80728.md?page=1)
