How to Send an Email (Mail Message) from Linux Command Line Shell Làm thế nào để Gửi một email (thư tin nhắn) từ 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. Đôi khi hệ thống quản trị có thể cần phải gửi một email thử nghiệm, hoặc tin nhắn thư khẩn cấp ngay từ vỏ hoặc thông dịch dòng lệnh khi sử dụng một hương vị phân phối Linux hay hệ điều hành, được Red Hat Fedora, Ubuntu, Debian, CentOS, Open SUSE, FreeBSD và những người khác. In this case, the mail command will come in handy. Trong trường hợp này, lệnh thư sẽ có ích.
mail is a command to send and receive mail in Unix, Linux and BSD operating system. mail là một câu lệnh để gửi và nhận thư trong Unix, Linux và hệ điều hành BSD. To initiate a mail sending process, just type in the following command: Để bắt đầu một quá trình gửi mail, chỉ cần gõ vào lệnh sau:
mail recipient@domain.com
Obviously, replace recipient@domain.com with a valid email address. Rõ ràng, thay thế recipient@domain.com với một địa chỉ email hợp lệ.
The system will prompt for a subject of the email before allowing user to type in the mail message body. Hệ thống sẽ nhắc nhở cho một chủ đề của email trước khi cho phép người dùng nhập vào cơ thể thư.
# mail receipent@domain.com # Mail receipent@domain.com
Subject: For Testing Only Tiêu đề: Để kiểm tra Chỉ
This email is for testing the mail delivery system only. Email này là để thử nghiệm hệ thống chuyển phát thư chỉ.
^D (EOT) ^ D (EOT)
Cc: Đồng gửi:
Once finished typing the email message, press Ctrl-D (shown as ^D in example above), which represents End of Text (EOT). Sau khi gõ xong tin nhắn email, nhấn Ctrl-D (hiển thị như ^ D trong ví dụ trên), đại diện cho kết thúc của văn bản (EOT). Depending on system, mail may or may not prompt another input request for any recipients to cc (carbon copy) to. Tùy thuộc vào hệ thống, thư có thể hoặc có thể không nhắc một yêu cầu đầu vào cho những người nhận để sao chép cc-bon () để. Press Enter to skip or accept the input, and get the mail sent. Nhấn Enter để bỏ qua hay chấp nhận đầu vào, và nhận được thư gửi.
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. Mẹo: Nếu người gửi và người nhận là trên cùng một hệ thống, nó có thể bỏ qua các tên miền (@ domain.com) là một phần của địa chỉ, để lại tên người dùng chỉ.
It's also possible to use mail's arguments or switches to directly send mail without interactive input. Cũng có thể sử dụng đối số hoặc chuyển mạch của thư trực tiếp gửi thư mà không có đầu vào tương tác. For example, Ví dụ,
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". Lệnh trên ngay lập tức sẽ gửi một email với cơ thể trống rỗng đến địa chỉ người nhận với các thử nghiệm "đối tượng". For more arguments, type "man mail". Đối với các đối số khác, gõ "man thư".
IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- Send an Anonymous Email Message With Web Based Anonymous Mail Service Providers Gửi một tin nhắn Email Chưa xác định người Với web Mail Dựa Chưa xác định người cung cấp dịch vụ
- Windows Media Center Shell (ehshell.exe) Command Line Switches and Options Windows Media Center Shell (ehshell.exe) Command Line tắc, và chọn
- Delay Sending of Email Message in Microsoft Outlook (Supports Gmail, Hotmail, Yahoo, AOL and all POP3/IMAP Mail) Sự chậm trễ của các email gửi tin nhắn trong Microsoft Outlook (Supports Gmail, Hotmail, Yahoo, AOL và tất cả các thư POP3/IMAP)
- Send Free Text Message With Hundreds of Email to SMS Gateway or Internet Web SMS from Operator Soạn Free Text Message Với Hàng trăm email đến SMS Gateway hoặc Internet Web SMS từ Điều Hành
- How to Create Email Account and Receive Mail for Abuse and Postmaster in Google Apps Làm thế nào để tạo Tài khoản Email và Nhận Mail cho Lạm dụng và Postmaster trong Google Apps
- Email Bounces Back with “unrouteable mail domain” Error Email Bounces Quay lại với "tên miền mail unrouteable" Lỗi
- Remove ESET NOD32 Checked Email Confirmation Tag Message in Email Hủy bỏ ESET NOD32 kiểm tra email xác nhận Thẻ báo trong Email
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut Khởi động lại hay tắt Windows (XP, 2000 và Vista) từ Command Line hay One-Click Shortcut
- Unlimited Email Storage and Infinity Mail Space for Yahoo! Email không giới hạn lưu trữ và Infinity Mail không gian cho Yahoo! Mail Mail
- Yahoo Mail New Feature to Allow E-Mailers Text-Message to Phones Yahoo Mail Tính năng mới để cho phép E-Mailers Text-Thông báo cho điện thoại










































July 29th, 2009 06:48 29 Tháng 7 Năm 2009 06:48
how do i config my sendmail to make it work? làm thế nào để tôi config sendmail của tôi để làm cho nó hoạt động? i have ubuntu and it wont work without it. i có ubuntu và nó làm việc wont mà không có nó.
thanks! cảm ơn!
June 29th, 2009 00:24 Ngày 29 tháng 6 2009 00:24
you have to config your sendmail to make it work bạn phải config sendmail của bạn để làm cho nó hoạt động
June 28th, 2009 11:53 Ngày 28 Tháng Sáu 2009 11:53
Argh. Argh. It's a Terminal not a commandline. Đó là một ga không phải là một commandline.