1

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" destination@adress.com

But the -s option is not recognized. How send email from command line specifying the email subject and using postfix?

1 Answer 1

1

Take a look at mailx:

echo "hello world" | mailx -s "Test from CLI" recipient@example.com
1
  • Thanks a lot for your help, ones of the Ubuntu packages to get a mailx command working is: bsd-mailx
    – user120858
    Aug 26, 2013 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy