Linux 命令列 傳送郵件

2021-06-23 06:14:29 字數 488 閱讀 4351

1、

mail -s hi [email protected]

[email protected]發一封主題為hi的信(沒有正文)

編輯完內容後ctrl-d結束。

2、echo 「this is a test mail!」|mail -s hi

[email protected]

[email protected]發一封主題為hi的信(正文是this is a test mail!)

3、mail -s hi

[email protected]

< file

以file的內容為郵件內容發信,首先選擇事先寫好乙個文件然後再mail過去。

4、帶附件的郵件傳送

4.1 如果你的系統中沒有uuencode命令的話,則需要先安裝sharutils(sudo apt-get install sharutils)

4.2 uuencode myfile myfile|mail -s hi  [email protected]

其中myfile就是要新增的附件

ubuntu下命令列傳送郵件

參考 驗證傳送成功,請大膽嘗試,但後果自負哈 不用說首先安裝軟體,ubuntu大家都知道的哈,傻瓜式sudo apt get install mutt msmtp,一切預設設定就行。接著開始各種配置,很簡單,不想麻煩,可以copy,當然我也是ctrl c的 mutt 系統全域性設定 etc mutt...

Linux中用命令列方式傳送郵件

關於用命令列的方式傳送郵件,我剛開始的時候使用的是mail。由於使用它的配置太過於繁瑣,目前還沒有能力搞定。所以就找到了乙個簡單的方法 mutt msmtp 方式。首先,執行幾條命令 sudo apt get install msmtp sudo apt get install mutt sudo ...

window 命令列發郵件

命令列輸入 telnet 連線到郵箱伺服器 向伺服器表明身份,繼續輸入 helo 163.com,預期返回 250 ok 登入認證 續輸入 auth login後回車,預期返回 334 dxnlcm5hbwu6 接下來以此輸入郵箱 賬戶和密碼 此密碼為郵箱授權碼 不是你的郵箱密碼 繼續輸入 data...