Send email from Ubuntu command line

Summary

Sending emails directly from the Ubuntu command line involves first installing exim4, exim4-config, and mailutils using apt-get. Once these packages are configured, the `mail` command becomes available for both checking incoming mail and composing new messages. To send an email, execute `mail `, then input the subject and the body of the message. After completing the body, press Ctrl+D to finalize and dispatch the email. For users seeking a more comprehensive email client setup, configuring Evolution mail is presented as an alternative.

First install exim4 and exim4-config using the package manager then install mailx

sudo apt-get install mailutils

and follow the prompts

once this is set up use the command “mail” to check your mail.

if you would like to send mail type “mail” followed by the email address to mail it to eg

mail me@examplecom

enter the subject and press

enter the body and keep pressing enter as many times as you need to, when your body is finished, press “Ctrl” and “D" together this will prompt you for a cc etc and finally the mail will be sent.

If you want to setup mail client, you may want to follow Evolution mail configuration with Hotmail on Ubuntu

EMAIL UBUNTU COMMAND LINE MAILUTILS

  RELATED

  COMMENTS

0

No comment for this article.