Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the mailx command of linux to send and receive mail

Shulou Source: shulou.com Published: 2022-06-02 18:41:00 09月22日 Update

This article will explain in detail about using linux's mailx command to send and receive emails. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

You can use the mailx command to send and receive messages with the name of the recipient, which is easier to view than mail.

Syntax format: mailx [parameters] [user]

Common parameters:

Reference example

Send the message to the user of the local system zhangsan:

[root@linuxcool ~] # mailx zhangsan

Send an email to zhangsan@qq.com:

[root@linuxcool ~] # mailx zhangsan@qq.com

Send the file as the content of an email:

[root@linuxcool] # mailx-s "send with content that is a file" root@localhost < ftp2.txt so much about sending and receiving emails using linux's mailx command. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Tags: Email commands content parameters more users articles references good practical names instances commonly used recipients files articles formats messages electronic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MySQL OPPO Reno MariaDB Apple