1 | DS <some_mail_relay_host> |
1 | Dj <your_FQDN> |
1 | $ echo "tester" | mail email_addr |
1 | $ echo "tester" | mail "email_addr, email_addr_2" |
1 2 | $ list="email_addr email_addr_2" $ echo "tester" | mail -s "`hostname` system is up" $list |
1 2 3 4 5 6 7 8 | #!/bin/sh sendmail -t -F 'Webmaster' -f 'webmaster@email.com' <<mayday From: webmaster <webmaster@email.com> To:email_addr Subject: Feedback Form Hello World ! mayday |
1 | df | mail -s "output of df command" email_addr |
1 | $(command) |
1 2 3 4 5 6 7 8 | #!/bin/sh list="email_addr email_addr_2" mail -s "`hostname` Here's your report" $list <<mayday Hi Guys, Included is df and /etc/hosts file.. $(df -g) $(cat /etc/hosts) mayday |
1 | uuencode <source_file> <attached_filename_in_email> |
1 2 | uuencode /home/dxtans/file1.txt file1.txt |mail -s "Attached is the file1.txt.." \ email_addr |
1 | uuencode /opt/software/unzip unzip |mail -s "Attached is the unzip binary" email_addr |
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh list="email_addr" mail -s "here are the files" $list <<mayday hello, Here are the files attached . DT ~<!uuencode /home/dxtans/tansley.jpg tansley.jpg ~<!uuencode /home/dxtans/badge.jpg badge.jpg ~<!uuencode /home/dxtans/file1.txt file1.txt mayday |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/bin/sh to='email_addr' sendmail -t <<mayday To ![]() Subject: here are it is Content-Type: text/html Content-Transfer-Encoding:7bit <body> <hr> <font color="blue" size=3><b> Do you like the image ? <br>Here is a border with names<br> <table border=4 cellpadding=8> <tr> <td>alpha</td> <td>bravo</td> <td>charlie</td> </tr> </table> <br> David </font></body> mayday |
1 | <img src="//my_webserver/icons/picture.gif"> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |