Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## mailコマンド
- ```bash
- mail [-s 題名] [宛先]
- ```
- このコマンドを実行すると、本文、CCを順に入力するようになります。
- 本文を入力し終わったら「.」ドットで終了させます。
- ```
- $ mail -s テストメール test@example.com
- Cc: test@example.com(空白でも可)
- 本文です。
- .
- ```
- ## メールのFromを指定
- メールコマンドの最後に「–」(ハイフン2つ)を付けて、「-f メールアドレス」を入力します。
- ```bash
- $ mail -s テストメール test@example.com -- -f test@test.test
- # echo "Test Mail." | mail -s "test mail" -aFrom:from@example.com to@test.test
- ```
- これで、test@test.testからのメールとして届きます。
Add Comment
Please, Sign In to add comment