發送主題為字串變數的郵件

發送主題為字串變數的郵件

Ubuntu菜鳥在這裡,我想發送一封電子郵件,我從sh腳本內的變數獲取主題,在下面的腳本中註意主題變數。郵件已發送但主題是“$subject”而不是 SSH 登入

#!/bin/bash
##This script sends a message

    subject="SSH Login:"
    curl -s --user 'api:key-xxxxxxxxxxxxxxx' https://api.eu.mailgun.net/v3/adoptatias.com/messages -F from='Excited User <[email protected]>' -F to='[email protected]' -F subject='$subject' -F text='Detected succesfull SSH login'


exit 0;

我究竟做錯了什麼?

相關內容