How to Send an Email (Mail Message) from Linux Command Line Shell Comment envoyer un courriel (message électronique) à partir de Linux en ligne de commande Shell

Occasionally system administrator may need to send a test email, or emergency mail message right from the shell or command line interpreter when using a Linux flavor or distribution of operating system, be Red Hat Fedora, Ubuntu, Debian, CentOS, Open SUSE, FreeBSD and others. Occasionnellement, l'administrateur système mai besoin d'envoyer un message de test, ou en cas d'urgence message à droite de la ligne de commande shell ou d'interprète lors de l'utilisation d'une version Linux de la saveur ou la distribution de système d'exploitation, Red Hat est Fedora, Ubuntu, Debian, CentOS, Open SUSE, FreeBSD et d'autres. In this case, the mail command will come in handy. Dans ce cas, la commande mail vous sera utile.

mail is a command to send and receive mail in Unix, Linux and BSD operating system. mail est une commande pour envoyer et recevoir du courrier sous Unix, Linux et BSD du système d'exploitation. To initiate a mail sending process, just type in the following command: Pour initier un processus d'envoi de mail, il suffit de taper la commande suivante:

mail recipient@domain.com

Obviously, replace recipient@domain.com with a valid email address. De toute évidence, remplacer recipient@domain.com avec une adresse email valide.

The system will prompt for a subject of the email before allowing user to type in the mail message body. Le système rapide pour un sujet de l'e-mail avant d'autoriser l'utilisateur à taper dans le corps du message électronique.

# mail receipent@domain.com # Mail receipent@domain.com
Subject: For Testing Only Sujet: Pour les essais seulement
This email is for testing the mail delivery system only. Ce courriel est pour tester le système de distribution du courrier uniquement.
^D (EOT) ^ D (EOT)
Cc: Cc:

Once finished typing the email message, press Ctrl-D (shown as ^D in example above), which represents End of Text (EOT). Une fois terminé de taper le message, appuyez sur Ctrl-D (D ^ comme indiqué dans l'exemple ci-dessus), qui représente la fin du texte (EOT). Depending on system, mail may or may not prompt another input request for any recipients to cc (carbon copy) to. Selon le système de mail mai ou mai ne pas inviter une autre demande d'entrée à tout destinataire cc (copie carbone) à. Press Enter to skip or accept the input, and get the mail sent. Appuyez sur Entrée pour sauter ou d'accepter l'entrée, et d'obtenir le mail envoyé.

Tip: If the sender and recipient is on the same system, it's possible to omit the domain (@domain.com) part of the address, leaving only user name. Astuce: Si l'expéditeur et le destinataire se trouve sur le même système, il est possible d'omettre le domaine (@ domain.com) partie de l'adresse, ne laissant que le nom d'utilisateur.

It's also possible to use mail's arguments or switches to directly send mail without interactive input. Il est également possible d'utiliser les arguments de mail ou d'interrupteurs d'envoyer directement du courrier sans interactive entrée. For example, Par exemple,

mail -s Test address@domain.com < /dev/null

Command above will immediately send a blank email with empty body to the recipient address with the subject "Test". Commande ci-dessus sera immédiatement envoyer un email vide avec caisse vide à l'adresse du destinataire avec le sujet "Test". For more arguments, type "man mail". Pour plus d'arguments, de type "man mail".

IMPORTANT : The page is machine translated and provided "as is" without warranty. IMPORTANT: La page de traduction et de la machine est fourni "tel quel" sans garantie. Machine translation may be difficult to understand. La traduction automatique mai être difficile à comprendre. Please refer to S'il vous plaît se référer à original English article article original en anglais whenever possible. chaque fois que possible.


2 Responses to “How to Send an Email (Mail Message) from Linux Command Line Shell” 2 réponses à "Comment envoyer un courriel (message électronique) de la ligne de commande Linux Shell"

  1. tim tim
    June 29th, 2009 00:24 29 juin 2009 00:24
    2 2

    you have to config your sendmail to make it work vous avez à votre config sendmail pour le faire fonctionner

  2. 908 908
    June 28th, 2009 11:53 28 juin 2009 11:53
    1 1

    Argh. Argh. It's a Terminal not a commandline. C'est un terminal pas une commande.

Leave a Reply Laissez une réponse

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Vous pouvez utiliser ces tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Abonnez-vous aux commentaires fonctionnalité a été désactivée. To receive notification of latest comments posted, subscribe to Pour recevoir la notification des derniers commentaires, abonnez-vous à My Digital Life Comments RSS feed My Digital Life Commentaires RSS or ou register to receive s'inscrire pour recevoir des new comments in daily email digest. tous les jours de nouveaux commentaires par courriel à digérer.
Custom Search

New Articles Nouveaux articles

Incoming Search Terms for the Article Des termes de recherche utilisés pour l'article

linux mail command linux commande mail - -- sendmail command line ligne de commande sendmail - -- linux send mail from command line linux envoyer des messages à partir de la ligne de commande - -- linux send email command line linux envoyer un e-mail en ligne de commande - -- send mail from command line linux envoyer un mail depuis la ligne de commande linux - -- command line email linux e-mail en ligne de commande linux - -- email from linux command line e-mail à partir de linux en ligne de commande - -- sendmail command line email e-mail en ligne de commande sendmail - -- sending mail from command line envoi de mail en ligne de commande - -- yahoo hotmail yahoo hotmail - -- linux command line mail command linux en ligne de commande électronique de commande - -- sendmail command example in linux with subject and body commande sendmail exemple dans Linux avec l'objet et le corps - -- how to send an email comment envoyer un e-mail - -- linux send email from command line linux envoyer un e-mail de la ligne de commande - -- test email address send message test adresse e-mail envoyer un message - -- mail command in shell mail de commande en shell - -- send mail from command line envoyer un mail depuis la ligne de commande - -- send yahoo mail from command line envoyer yahoo mail depuis la ligne de commande - -- how to send mail from linux command line comment envoyer des messages à partir de la ligne de commande linux - -- linux cli mail cli linux mail - -- linux mail command line mail en ligne de commande linux - -- email sending in command line e-mail d'envoi en ligne de commande - -- linux sendmail command example linux commande sendmail exemple - -- sendmail command line example exemple de ligne de commande sendmail - -- test send email linux envoyer un e-mail de test linux - -- linux mail command from linux commande mail de - -- linux send email linux envoyer un e-mail - -- how to use mail in linux comment utiliser le courrier dans linux - -- "mail -s" + linux + 2 recipients addresss "mail-s" + linux + 2 adresses des destinataires - -- command to send message from LINUX pc commande pour envoyer un message à partir de Linux pc - -- debian howto send mail shell Comment envoyer un mail debian shell - -- debial send mail from command line debial envoyer des messages à partir de la ligne de commande - -- example of mail command in linux exemple de la commande mail sous Linux - -- getting my linux pc to send email d'obtenir mon pc linux pour envoyer un e-mail - -- how to send a mail in linux example comment envoyer un mail à linux par exemple - -- How to Check sendmail Comment vérifier sendmail - -- linux mail command recipients linux commande mail des destinataires - -- linux command line send linux en ligne de commande envoyer - -- linux command line mail linux en ligne de commande mail - -- mail linux commandline from mail de commande de linux - -- mail command depends on operating system mail de commande dépend du système d'exploitation - -- send test email from linux console mail command envoyer des email de test console linux commande mail - -- sending mail from linux terminal envoyer du courrier à partir de linux terminal - -- test mail domain linux test de domaine de messagerie Linux - -- test send mail command line envoyer un mail de test en ligne de commande - -- which linux mail command qui commande linux mail - -- anonymous email e-mail anonyme - -- bsd mail howto send bsd mail Comment envoyer - -- commandline email linux e-mail de commande linux - -- debian send mail from shell debian envoyer des messages à partir du shell - --