Unix--mailx를 사용하여 메일의 첨부 파일, 제목 및 본문 보내기

Unix--mailx를 사용하여 메일의 첨부 파일, 제목 및 본문 보내기

mailx 명령을 사용하여 메일의 첨부 파일, 제목 및 본문을 보내는 방법을 알려주십시오.

나는 사용하고있다

uuencode travel$datestamp.XLS Travel$datestamp.XLS | mail -s "International Savers Tracking" [email protected] -- -f [email protected] < BodyofTheMail.txt 

메일 본문 없이 제목만 첨부 파일로 보내는 중

답변1

당신은 에 파이프하고 간접적으로 연결하고 있습니다 mail. 표준 입력은 하나만 가질 수 있습니다. 또한 uuencode필요하지 않습니다. 노력하다:

mail -s "Subject" -a /path/to/attachments/file.ext [email protected] < /path/to/messagebody.txt

관련 정보