1

I am in the last step of the send mail config, due to some issues the send mail in /usr/sbin/ is not getting accessed even though i gave permissions. I have to perform the following step

     /usr/sbin/sendmail [email protected] < "My test email being sent from sendmail"

1 Answer 1

0

sendmail expects email headers before email body on its standard input.

Try the test command below:

#!/bin/sh
/usr/sbin/sendmail -i -- [email protected] <<END
subject: test

My test email being sent from sendmail
END

-i - do not treat "single dot" line as end of message
-- - end of command line options (only recipient addresses follow)
-t - get recipient addresses from email headers

1
  • It is showing this type of error, bash: cd: /usr/sbin/sendmail: Not a directory Mar 26, 2013 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .