Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the mail command to send mail on Linux

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use mail command to send mail on Linux", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to use mail command to send mail on Linux" this article bar.

The mail command is easy to use. If you don't need to send an attachment, you can send an email using the following mail command format:

$ echo "This is the mail body" | mail -s "Subject" 2daygeek@gmail.com

If you want to send an attachment, use the following mail command format:

$ echo "This is the mail body" | mail -a test1.txt -s "Subject" 2daygeek@gmail.com

-a: Used to add attachments to Red Hat-based systems.

-A: Used to add attachments to Debian-based systems.

-s: Specifies the message title.

Linux is a free-to-use and freely distributed UNIX-like operating system, is a POSIX-based multi-user, multitasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

The above is "how to use mail command on Linux to send mail" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report