issue115:tuto1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue115:tuto1 [2016/12/10 17:50] – d52fr | issue115:tuto1 [2016/12/12 16:03] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 12: | Ligne 12: | ||
Let’s look a little closer. You can easily change the “r” option to configure which “from line” is presented to the mail client when the email is picked up at the other end. This is sometimes surprisingly difficult to get working with other command-line mail clients.** | Let’s look a little closer. You can easily change the “r” option to configure which “from line” is presented to the mail client when the email is picked up at the other end. This is sometimes surprisingly difficult to get working with other command-line mail clients.** | ||
+ | |||
+ | De temps en temps, je me trompe quand j' | ||
+ | |||
+ | Même si vous avez installé un MTA (Mail Transfert agent - Agent de transfert du courrier) comme l' | ||
+ | |||
+ | Passons à l' | ||
+ | |||
+ | aptget install heirloommailx | ||
+ | |||
+ | Réfléchissons un instant à cet exemple bien rempli de ligne de commande : | ||
+ | |||
+ | mailx r ' | ||
+ | |||
+ | Regardons-le d'un peu plus près. Vous pouvez facilement changer l' | ||
**The other options hopefully make sense too. The “s” option allows you to edit your email’s subject whereas the “a” option is the filename of the attachment that you are adding from your local filesystem. One handy hint is to compress the file if the plain text arrives with extra, unwanted carriage returns. Incidentally you should also ensure that you’re using the full path to the attached file if you have issues. | **The other options hopefully make sense too. The “s” option allows you to edit your email’s subject whereas the “a” option is the filename of the attachment that you are adding from your local filesystem. One handy hint is to compress the file if the plain text arrives with extra, unwanted carriage returns. Incidentally you should also ensure that you’re using the full path to the attached file if you have issues. | ||
Ligne 22: | Ligne 36: | ||
I’m pointing this out because you could also insert a text file into the body by replacing “< / | I’m pointing this out because you could also insert a text file into the body by replacing “< / | ||
+ | |||
+ | De même, les autres options sont compréhensibles, | ||
+ | |||
+ | Prenez bonne note que l' | ||
+ | |||
+ | Comparez et différenciez l' | ||
+ | |||
+ | mailx r ' | ||
+ | |||
+ | Je vous précise ceci car vous pourriez aussi insérer un fichier texte dans le corps du message en remplaçant « /dev/null » par quelque chose comme cet exemple « / | ||
**Consider this scenario now for a second: you don’t want to insert a whole file but instead send some other text directly from your command-line. You can also follow this now familiar format by echoing text through a pipe: | **Consider this scenario now for a second: you don’t want to insert a whole file but instead send some other text directly from your command-line. You can also follow this now familiar format by echoing text through a pipe: | ||
Ligne 32: | Ligne 56: | ||
Before we stop looking at command-line email, let’s quickly think about an alternative to solving the problem of changing the “from line” or sender name. It’s not too tricky (I’m sure you’ll be glad to read).** | Before we stop looking at command-line email, let’s quickly think about an alternative to solving the problem of changing the “from line” or sender name. It’s not too tricky (I’m sure you’ll be glad to read).** | ||
+ | |||
+ | Maintenant, analysez ce scénario pendant une seconde : vous ne voulez pas insérer un fichier complet, mais, plutôt, envoyer un autre texte, directement depuis votre ligne de commande. Vous pouvez aussi faire suivre ce format, maintenant connu, par un écho du texte à travers un « pipe » : | ||
+ | |||
+ | echo e “Text content goes here.\n And here.” | mailx r ' | ||
+ | |||
+ | Je n'ai pas encore expliqué que l' | ||
+ | |||
+ | Notez qu'il est facile d' | ||
+ | |||
+ | Avant de terminer notre aperçu des mails en ligne de commande, réfléchissons rapidement à une alternative pour résoudre le problème de la modification de la ligne « De » ou du nom de l' | ||
**Another command-line email client option is to install “mutt” in case you can’t get your hands on a “mailx” derivative. In order to use it, you have to edit the “.muttrc” file, found in the home directory of the user who is sending the email. Here’s an example: | **Another command-line email client option is to install “mutt” in case you can’t get your hands on a “mailx” derivative. In order to use it, you have to edit the “.muttrc” file, found in the home directory of the user who is sending the email. Here’s an example: | ||
Ligne 42: | Ligne 76: | ||
Personally, I prefer the “mail" | Personally, I prefer the “mail" | ||
+ | |||
+ | Une autre option du client de mail en ligne de commande est d' | ||
+ | |||
+ | set realname=" | ||
+ | |||
+ | Dans le texte de « .muttrc » ci-dessus, l' | ||
+ | |||
+ | Il y a beaucoup plus d' | ||
+ | |||
+ | Personnellement, |
issue115/tuto1.1481388607.txt.gz · Dernière modification : 2016/12/10 17:50 de d52fr