제목을 문자열 변수로 사용하여 메일 보내기

제목을 문자열 변수로 사용하여 메일 보내기

여기 우분투 멍청한 놈, sh 스크립트 내부의 변수에서 주제를 얻는 이메일을 보내고 싶습니다. 아래 스크립트에서 주제 변수를 확인하세요. 메일이 전송되었지만 제목이 SSH 로그인 대신 "$subject"입니다.

#!/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;

내가 도대체 ​​뭘 잘못하고있는 겁니까?

관련 정보