Apply for a temporary e-mail address
Centos
centos comes mail tool
Installation mail
- yum -y install mailx
Configuring the sender account information
- vim /etc/mail.rc
- In the last two lines of code plus
- set [email protected] smtp=smtp.163.com
- set [email protected] smtp-auth-password=666666 smtp-auth=login
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
- set [email protected] smtp=smtp.163.com
- set [email protected] smtp-auth-password=666666 smtp-auth=login
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
- mail -s test -c admin@aispider.com root@aispider.com< file
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
- sendEmail -f [email protected] -t [email protected] -s smtp.163.com -u "theme test" -o message-content-type = html -o message-charset = utf-8 -o tls = no -xu [email protected] -m "message content" -xp 123
Send people
- -f -t [email protected] [email protected] sendEmail [email protected] -s smtp.163.com -u "theme test" -o message-content-type = html -o message-charset = utf- 8 -o tls = no -xu [email protected] -xp 123 -m " message content"
Send Cc
- -f -t [email protected] [email protected] sendEmail -cc [email protected] -s smtp.163.com -u "theme test" -o message-content-type = html -o message-charset = utf-8 -o tls = no -xu [email protected] -xp 123 -m " message content"
send attachments
- sendEmail -f [email protected] -t [email protected] -s smtp.163.com -u " theme test" -o message-content-type = html -o message-charset = utf-8 -o tls = no -xu [email protected] -xp 123 -m "message content" -a ./abc.txt