Sending mail from a Bash shell script

前端 未结 12 1496
梦毁少年i
梦毁少年i 2021-01-29 22:54

I am writing a Bash shell script for Mac that sends an email notification by opening an automator application that sends email out with the default mail account in Mail.app. The

12条回答
  •  遥遥无期
    2021-01-29 23:28

    Send mail from Bash with one line:

    echo "your mail body" | mail -s "your subject" yourmail@yourdomain.com -a "From: sender@senderdomain.com"
    

提交回复
热议问题