Send mail in linux
In Linux, you can send an email using the mail
command or other email clients like mutt
or sendmail
. Here are some examples:
Using the mail
command:
- Open a terminal and type:
mail -s "Subject" [email protected]
- This will open a simple text editor where you can type your email message.
- When you're done, type
Ctrl+D
to send the email.
Using mutt
email client:
- Install
mutt
if you haven't already:sudo apt-get install mutt
(on Ubuntu-based systems) - Open a terminal and type:
mutt [email protected]
- This will open the
mutt
email client. Type your email message in the compose window. - When you're done, click the "Send" button or type
q
to quit and send the email.
Using sendmail
command:
- Install
sendmail
if you haven't already:sudo apt-get install sendmail
(on Ubuntu-based systems) - Open a terminal and type:
sendmail -t [email protected]
- This will open a text editor where you can type your email message.
- When you're done, type
Ctrl+D
to send the email.
Using a GUI email client:
- Install a GUI email client like
Evolution
orThunderbird
. - Open the email client and create a new email message.
- Enter the recipient's email address and type your message.
- Click the "Send" button to send the email.
Note: Make sure you have a working email setup on your Linux system, including a mail server and a valid email address.