How to send mail from the command line?
|
|
Try to install The Mutt E-mail Client. Other option is using emacs with gnus. Others options available too... IMHO, you should use more details in your questions, or several different answers to your question you will receive :-) |
|||||||||
|
usage:
If you don't want to specify your password in the command line (generally not a good thing to do), you can omit that parameter and sendemail will prompt you for the password... and display it on the screen, but at least it won't be in your command line history. |
|||||||||||||||||||||
|
|
Run:
The following needs to be added there:
Run:
Enter there:
Enable "less secure apps" on Gmail: Test it by running the following on terminal:
|
||||
|
|
|
In addition to above I was still getting this error
SOLUTION : do a gmail password reset even when current password is correct ... possibly Google security precaution |
|||
|
|
You can also put the text in file and send it as follows:
|
|||||||||||||||||||||
|
|
Install the package
then write your email then press Ctrl+D |
||||
|
|
|
Most of the time you shouldn't need to configure an SMTP server you can simply use
You terminate messages with a single |
|||||||||||||||||||||
|
where |
|||||||||
|
|
I have never tried it but there is a To test local email:
|
||||
|
|
|
You need an MTA to send mail. For this, use postfix:
To send email:
|
|||||||||||||
|
or
|
|||||||||
|
|
You can try this:
It works with GNU Mailutils, check the website for more information. |
||||
|
|
You can send an email from the command line with TelNet or NetCat.Everything is explained here.
|
|||||||||||||
|
|
mpack is excellent commandline way of sending file attachments.
usage:
|
|||
|
|
|
If you try to send e-mail from a system, whitch does not run an own e-mail-server (i. e. desktop system), you need to install something like nullmailer or esmtp, which forward your local mail to a "real" mail server. As command line tools you can install mail or mailx (packages mailutils, heirloom-mailx or bsd-mailx). If you need attachments try biabam. |
|||||
|
protected by jokerdino♦ May 6 '13 at 14:36
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
