In Linux, you can send an email using the sendmail
command. First, ensure sendmail
is installed and properly configured. To send an email, use the following command:
This command sends an email with the subject “Test Email” and body “This is a test email.” The echo -e
part allows for multi-line input. To send emails with attachments, use a tool like mutt
.
Make sure the sendmail
service is running and that the email server is configured correctly to avoid issues with delivery.