If you need to sent a test email from a server via command line, you can use the following.
This one uses PHP to send the email. Simply replace [email protected] with your own email address.
php -r “mail(‘[email protected]’, ‘test’, ‘test’);”
To send mail directly to the mail queue without the use of PHP, use the following.
mail -v [email protected]
It will then ask you to supply a subject. Just type in test and press enter. It will then take you to a blank line. You can either put a message, then on a blank line put a single period “.” to send the email, or if you don’t need to put a message, just put a period, and press enter.