Guest User

Untitled

a guest
Mar 2nd, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. ## mailコマンド
  2.  
  3. ```bash
  4. mail [-s 題名] [宛先]
  5. ```
  6.  
  7. このコマンドを実行すると、本文、CCを順に入力するようになります。
  8. 本文を入力し終わったら「.」ドットで終了させます。
  9.  
  10. ```
  11. $ mail -s テストメール test@example.com
  12. Cc: test@example.com(空白でも可)
  13. 本文です。
  14. .
  15. ```
  16.  
  17. ## メールのFromを指定
  18.  
  19. メールコマンドの最後に「–」(ハイフン2つ)を付けて、「-f メールアドレス」を入力します。
  20.  
  21. ```bash
  22. $ mail -s テストメール test@example.com -- -f test@test.test
  23. # echo "Test Mail." | mail -s "test mail" -aFrom:from@example.com to@test.test
  24. ```
  25.  
  26. これで、test@test.testからのメールとして届きます。
Add Comment
Please, Sign In to add comment