LoginSignup
0
0

More than 5 years have passed since last update.

mailxコマンドで、FromとEnvelope Fromを指定する

Last updated at Posted at 2015-07-06

CentOS6.6のmailx-12.4-8.el6_6.x86_64で確認しています。

test.sh
#!/bin/bash

export LANG=ja_JP.utf8

to=you@host.domain
from=me@host.domain
env_from=空条承太郎
subject=こんばんは

cat body.txt | mail -s "${subject}" -S from="${env_from} <${from}>" ${to}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0