I am trying to send a test email from command line (for debugging purpose).
I cannot make the sendmail to send the email. The Ctrl+d does not work on my ssh console and I could not find a solution by search.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You have used the
-i options on the sendmail(8) command line. If you drop the
-i option, the email body will be terminated with the
sendmail -t email@example.com From: firstname.lastname@example.org Subject: Test Test email .
Alternatively, put the message into a separate file.
sendmail -t -i email@example.com < test.txt