Use below command:

echo "Subject: sendmail test" | sendmail -v my@email.com

or

1.) Create a file called mail.txt (or anything you like) in ~/mail.txt with vim or nano or your preferred text editor

2.) Paste the following content to it, but of course adjusting the email addresses, as those are just sendmail command examples:

To: my@email.com
Subject: sendmail test two
From: me@myserver.com

And here goes the e-mail body, test test test..

3.) At last we send the e-mail template we just created with:

sendmail -vt < ~/mail.txt

More: https://clients.javapipe.com/knowledgebase/132/How-to-Test-Sendmail-From-Command-Line-on-Linux.html