mail, sendEmail the Send Mail command

Apply for a temporary e-mail address

 

Centos

centos comes mail tool

Installation mail

  • yum -y install mailx

Configuring the sender account information

 

Ubuntu

Installation mail

  • apt-get install heirloom-mailx

Configuring sender account information

  • vim /etc/s-nail.rc or /nail.rc (I am /etc/s-nail.rc)
  • Increase in the last two lines of code

 

mail tools

Read the contents of the documents sent

  • mail -s "subject" email address <path / filename

Pipeline Send form

  • echo "mail content" | mail -s "theme" E-mail address

Send a message to multiple users

Send e-mail attachments

  • yum install sharutils 或 apt-get install sharutils
  • uuencode /home/zhousir/httpd.conf httpd.conf|mail -s mailtest [email protected]
  • tar czf - /home/zhousir/ | uuencode home.tgz |mail -s mailtest [email protected]
  • uuencode test.txt test | mail -s "hello,see the attachement" [email protected] < mail.txt 

 

sendEmail tools

installation

  • apt-get install sendemail 

Send Content

Send people

Send Cc

send attachments

Published 302 original articles · won praise 304 · Views 300,000 +

Guess you like

Origin blog.csdn.net/u012206617/article/details/104635752