How to Send an Email (Mail Message) from Linux Command Line Shell Kā nosūtīt e-pasts (pasta ziņu) no Linux Command Line 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. Reizēm sistēmas administrators var būt nepieciešams nosūtīt testa e-pastu vai ārkārtas pasta ziņu tieši no čaumalas vai komandrindas tulks, ja izmanto Linux aromāts vai izplatīšana operētājsistēmas, ir Red Hat Fedora, Ubuntu, Debian, CentOS, Open SUSE, FreeBSD un citiem. In this case, the mail command will come in handy. Šajā gadījumā pasta komanda noderēs.

mail is a command to send and receive mail in Unix, Linux and BSD operating system. pasta komandu nosūtīt un saņemt pastu Unix, Linux un BSD operētājsistēmu. To initiate a mail sending process, just type in the following command: Lai uzsāktu pasta sūtīšanas process, vienkārši ierakstiet šādu komandu:

mail recipient@domain.com

Obviously, replace recipient@domain.com with a valid email address. Acīmredzot, nomainiet recipient@domain.com ar derīgu e-pasta adresi.

The system will prompt for a subject of the email before allowing user to type in the mail message body. Sistēma vaicāt priekšmets email pirms ļaut lietotājam veida pasta ziņojuma pamattekstā.

# mail receipent@domain.com # Pasta receipent@domain.com
Subject: For Testing Only Tēma: Par pārbaudi tikai
This email is for testing the mail delivery system only. Šī vēstule ir testēšanas pasta piegādes sistēmu only.
^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). Kad pabeigts rakstīt e-pasta ziņu, nospiediet Ctrl-D (parādīts kā ^ D piemērā augstāk), ko apliecina beigas Teksts (EOT). Depending on system, mail may or may not prompt another input request for any recipients to cc (carbon copy) to. Atkarībā no sistēmas, pasta var būt vai var nebūt tūlītēja citas ievades pieprasījumu visus cc (oglekļa kopiju saņēmēju) to. Press Enter to skip or accept the input, and get the mail sent. Nospiediet Enter, lai izlaistu vai pieņemt ievadi, un saņemt pasts nosūtīts.

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. Padoms: Ja nosūtītājs un saņēmējs ir par pašu sistēmu, ir iespējams neiekļaut domēnu (@ domain.com) daļa adresi, atstājot tikai lietotāja vārds.

It's also possible to use mail's arguments or switches to directly send mail without interactive input. Tas ir iespējams lietot arī pastu argumentiem vai pārslēdzas tieši nosūtīt pastu, kas nenodrošina interaktivitāti ievadi. For example, Piemēram,

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". Komanda iepriekš nekavējoties nosūtīt tukšu e-pastu ar tukšu organizācija saņēmēja adresi ar tematu "Test". For more arguments, type "man mail". Vairāk argumentiem, tipa "man pasts".

IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: lapa mašīna iztulkot un pasniegts tàds, "kàds tas ir" bez garantijas. Machine translation may be difficult to understand. Mašīntulkošanas var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.


3 Responses to “How to Send an Email (Mail Message) from Linux Command Line Shell” 3 atbildes uz "Kā Send Email (pasta ziņu) no Linux Command Line Shell"

  1. maria a. maria a.
    July 29th, 2009 06:48 Jūlijs 29, 2009 06:48
    3 3

    how do i config my sendmail to make it work? Kā es varu config my sendmail, lai tā darbotos? i have ubuntu and it wont work without it. Man ir ubuntu un paradis darbu bez tā.
    thanks! pateicība!

  2. tim tim
    June 29th, 2009 00:24 Jūnijs 29, 2009 00:24
    2 2

    you have to config your sendmail to make it work Jums config jūsu sendmail, lai tā darbotos

  3. 908 908
    June 28th, 2009 11:53 Jūnijs 28, 2009 11:53
    1 1

    Argh. Argh. It's a Terminal not a commandline. Tas Terminal nav commandline.

Leave a Reply Leave a Reply

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> Jūs varat izmantot šos tagus: <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. Parakstīties uz komentāriem iezīme ir atspējota. To receive notification of latest comments posted, subscribe to Saņemt informāciju par jaunāko komentārus, parakstīties uz My Digital Life Comments RSS feed Mana Digital Life Comments RSS feed or vai register to receive reģistrēties, lai saņemtu new comments in daily email digest. jauni komentāri ikdienas e-pasta sagremot.
Custom Search

New Articles Jauns pants

Incoming Search Terms for the Article Ienākošo Meklēt noteikumi pants

linux mail command Linux mail komanda - -- sendmail command line sendmail komandrindas - -- sendmail command line example sendmail komandrindas piemērs - -- send mail from command line sūtīt vēstules no komandrindas - -- linux mail command line Linux mail komandrindas - -- sendmail command example sendmail komanda piemērs - -- linux mail from address linux pastu no adreses - -- mail command in linux mail komandu linux - -- linux command line mail Linux komandrindas pasts - -- linux mail command example Linux mail komanda piemērs - -- send mail command line linux nosūtīt pastu komandrindas linux - -- command line email linux komandrindas email linux - -- linux send mail from command line linux sūtīt vēstules no komandrindas - -- send mail from command line linux sūtīt vēstules no komandrindas linux - -- linux send email Linux sūtīt e-pastu - -- mail command linux mail komandu linux - -- send email from command line sūtīt e-pastu no komandrindas - -- sendmail command line subject sendmail komandrindas pakļauts - -- sendmail example command line sendmail piemēram komandrindas - -- linux sendmail example linux sendmail piemērs - -- linux send email from command line linux sūtīt e-pastu no komandrindas - -- linux email command line linux email komandrindas - -- linux mail command from Linux mail komandu - -- how to send mail in linux Kā nosūtīt pastu linux - -- linux sendmail command linux sendmail komanda - -- email command line email komandrindas - -- all viss - -- mail linux command mail linux komanda - -- linux command line email Linux komandrindas e-pastu - -- sendmail command in linux sendmail komandu linux - -- linux email command Linux email komanda - -- linux mail command from address linux pasta komandu adrese - -- linux sendmail command line linux sendmail komandrindas - -- how to send mail from linux command line Kā nosūtīt pastu no Linux komandrindas - -- linux sendmail command example linux sendmail komanda piemērs - -- man mail linux vīrietis pasts linux - -- sendmail command line email sendmail komandrindas e-pastu - -- send email command line linux sūtīt e-pastu komandrindas linux - -- shell mail command shell pasts komanda - -- sendmail send test email sendmail nosūtīt testa e-pastu - -- yahoo mail command line yahoo mail komandrindas - -- linux send email command line linux sūtīt e-pastu komandrindu - -- sendmail linux example sendmail linux piemērs - -- sending mail from command line sūtīt e-pastu no komandrindas - -- linux commandline mail Linux commandline pasts - -- send command line email Uzrakstīt komandrindas e-pastu - -- linux send mail command line linux sūtīt pasts komandrindu - -- send email from linux command line sūtīt e-pastu no Linux komandrindas - -- mail linux command line mail Linux komandrindas - -- how to send email in linux Kā nosūtīt e-pastu linux - --