How send email from command line specifying the email subject and using postfix?
5,095
Take a look at mailx:
echo "hello world" | mailx -s "Test from CLI" [email protected]
Author by
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
I installed Postfix, and get the
/usr/lib/sendmail
binary. What I want is send an email alo/usr/bin/printf "%b" "EMAIL_BODY" | /usr/lib/sendmail -s "EMAIL_SUBJECT" [email protected]
But the
-s
option is not recognized. How send email from command line specifying the email subject and using postfix? -
Admin over 10 yearsThanks a lot for your help, ones of the Ubuntu packages to get a mailx command working is: bsd-mailx