create account

LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE by aschatria

View this thread on: hive.blogpeakd.comecency.com
· @aschatria ·
$2.85
LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE
![Screenshot_19.jpg](https://steemitimages.com/DQmNv4Tk4eug9izSJvpmHXC8GVTJjv6LYqjxo3FeJK9msbP/Screenshot_19.jpg)

**Linux is a fun thing to use, as you can get pretty much everything going within a few lines of a code. No need to download applications from the mysterious pages. Without losing time, a laptop can find it on its own, which is kind of amazing for me.**

Without a further ado, let me explain how to send an email from the Terminal command line. 

I'm using 32-bit Ubuntu 17.10 ( codename: artful) if something doesn't work quite as you planned from my tutorial you are either missing a library or your version is a bit different.
Not all versions are the same, especially because I am using older 32bit, and most of the people I know already have 64bit versions. 
And usually when there is a version for 32 there is one for 64. 
But, I am ok, I also have WinXP, the world didn't end and I write quite comfortably with it. I also have a dumbphone and it is the best piece of communication junk I ever owned. 
For me, the smartphone is a mini-computer that you can carry around and it is simply there to steal your family time.

The Terminal is the best thing ever because it spends less space and resources than a separate GUI interface, and it is very quick. 

*What is GUI?*
*It is a graphical user interface. That is simply said an application, a window or a box that you can see to use on your device.*

I am extremely grateful because I can do all things I like from one frame only, I don't need to open a few which can be pretty annoying.

For the email sending, you can install of course a 'real' application, at least the one that is visible, that you are used to having and the kind of an application that you can open from the Start Menu. So, if you dislike my idea of Terminal email, you can use for example the Geary.

**Geary** is an email application, and inbox for your mail. It is quite easy to download and install. 

Open your Terminal and type this.


```
sudo apt-get install geary
```

And.. you have it. Open the program, verify your email and you will start to receive the emails in a usual way for the desktop email program.

**But, if you want something more exotic, you would want to use the Terminal.**

Now, you could use the **Mutt**, but it will stop working within a few days of the activity.  I used only my Gmail on this Mutt program, because my other mail apps do not allow any POP/IMAP integrations. I guess there is a way to do it, but there is also an easier way, so why to bother. 

*I will make a tutorial on Mutt some other time, now I will only explain some basics.*

So, let's send an email.

First, you will need a program, of course.

So, open the Terminal and start typing.

```
sudo apt-get install mailutil
```
```
sudo apt-get install ssmtp
```
```
sudo vim /etc/ssmtp/ssmtp.conf

```

---> now hit 'i'

Find the line ( use Up and Down arrows) that says 

> FromLine Override=YES

... and delete little brackets ( # )

Add these lines, or fill them up with necessary information.

> AuthUser=yourusername@gmail.com
AuthPass=yourpassword ( you can use application specific password as well)
mailhub=smtp.gmail.com:587
Use STARTTLS=YES

Click on ESC and when you get an extra line below with ':' write 'wq' press Enter and a program will exit.

Now, you have all set, and you can send emails.

**Just one warning! Fireproof your main account ( online Gmail) with a Google OAuth or/and a phone, and you will be secure.**
You can also use an n application specific password for your desktop installation ( of any kind, not just this) and install some sort of a program to defend you from all malicious attempts.  If you are using this for shits and giggles, you don't need all that, carry on.

Now, you are out, the screen is empty, how do you send an email?

Let's try this. 

```
echo "text of a message" | mail -s "Title of your message" receiver@mail.com
```

Alt Gr ( right alt) + W = | 


Ok, but you want to style a message in the file and then send it because it will be a long message. 


Let's do everything without leaving the Terminal.

**Do not send a million emails, you will get blocked and blacklisted by Google, this is the same email box you usually use but the only difference is that you don't see an application window.**

First, you will need a place where you will keep your mail texts.
This command will create a directory or a folder where you will keep your message files.

```
mkdir Mail
```

Now, go inside of that directory, or a folder.

```
cd mail
```

Then you need to make a text file to write that message.
This command will create a file.

```
touch message.txt
```

Then you need to write something but you don't want to leave your Terminal. This is usually me. I hate opening too many tabs and windows. 

```
cat > message.txt
```

Now, write whatever you have and then press CTRL+D.

Take a look what you did in nano editor, add things if you need. You can also take a look at it with vim, vi or open it in the message folder.

```
nano message.txt
```

Ok, you have all that set, now let's send it. If you are only testing,  use your spare email till you learn how to do things properly. 

```
mail -s "title of your message" receiver@mail.com  <  /home/yourusername/Mail/message.txt
```

This command will send your message with a  body of a message written in the text file message.txt to the receiver@mail.com.

If you want to send to the multiple recipients, you have to specify it.

```
a="email1@mail.com, email2@mail.com, email3@mail.com"
```
```
mail -s "title of your message" $a  <  /home/yourusername/Mail/message.txt
```

I still like to send emails one by one, but if you need for any reason to send a message to a group, that is an easy and fast way.

Also, everything you send in this way will be visible in your email online account as well, so you can't miss anything, you can always check this.



I really enjoyed making this simple, basic tutorial for you, I hope you will put it into a good use and spare your time.


### Thank you for reading and visiting my blog!


<center><img src="https://steemitimages.com/DQmcbzh5zSywPA4DysW6gg6VCfmnZX3M2ACjwQ4AKNfBu3R/Untitled%20design.png"/></center>

<hr/>
<center><i>This post will be submitted within my interest zone in the communities listed in tags and banners </i></center>
<hr/>


#steemrepair
#qurator
#steemiansarena
#dynamicsteemians
#adsactly
#preppersonline
#ocd-resteem
<hr/>

<center><img src="https://i.imgur.com/7Yf0IAL.jpg"/><br/><br/>

<a href="https://discord.gg/vnbMHjM"><img src="https://i.imgur.com/8j8zmhA.png"/></a>

<a href="https://discord.gg/pJtWp57"><img src="https://steemitimages.com/DQmarWRv4wXiqPZbmtDCDRTwE5jewDQrG1ATrXcFrTThxht/Gifbanner.gif"/></a>

<a href="https://discord.gg/2WmTac9" ><img src="https://steemitimages.com/DQmQ5g8rLXMAUT9Tn3eCf1KbpPkcD9HeScxPnRJDDsmMrf7/ssteemians.png" ></a>

<a href="https://discord.gg/EwGhEzb" ><img src="https://i.imgur.com/t6dLyUu.jpg?1"></a>

<a href="https://discord.gg/255Td3q"><img src="https://steemitimages.com/DQmdhXd6XbeumeAxaS6XRFAnvKxk7VfeCzMnopNKatwuUf7/preppersonline.png)"></a>



</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 42 others
properties (23)
authoraschatria
permlinklinux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once
categorylinux
json_metadata{"tags":["linux","steemiansarena","dynamicsteemians","adsactly","preppersonline"],"image":["https://steemitimages.com/DQmNv4Tk4eug9izSJvpmHXC8GVTJjv6LYqjxo3FeJK9msbP/Screenshot_19.jpg","https://steemitimages.com/DQmcbzh5zSywPA4DysW6gg6VCfmnZX3M2ACjwQ4AKNfBu3R/Untitled%20design.png","https://i.imgur.com/7Yf0IAL.jpg","https://i.imgur.com/8j8zmhA.png","https://steemitimages.com/DQmarWRv4wXiqPZbmtDCDRTwE5jewDQrG1ATrXcFrTThxht/Gifbanner.gif","https://steemitimages.com/DQmQ5g8rLXMAUT9Tn3eCf1KbpPkcD9HeScxPnRJDDsmMrf7/ssteemians.png","https://i.imgur.com/t6dLyUu.jpg?1","https://steemitimages.com/DQmdhXd6XbeumeAxaS6XRFAnvKxk7VfeCzMnopNKatwuUf7/preppersonline.png)"],"links":["https://discord.gg/vnbMHjM","https://discord.gg/pJtWp57","https://discord.gg/2WmTac9","https://discord.gg/EwGhEzb","https://discord.gg/255Td3q"],"app":"steemit/0.1","format":"markdown"}
created2018-04-22 08:47:36
last_update2018-04-22 08:47:36
depth0
children12
last_payout2018-04-29 08:47:36
cashout_time1969-12-31 23:59:59
total_payout_value2.452 HBD
curator_payout_value0.401 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7,141
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,448,896
net_rshares432,661,505,962
author_curate_reward""
vote details (106)
@bigtom13 ·
Hmmmm.  I have always just used GMail on my Ubuntu machines, and I like the way that works for me.  It is certainly nice to know there is another option.  

I have 16,04 on my desktop and 14.04 on my laptop.  I'll switch to 18.04 as soon as the LTS version is available for the laptop.  

Always a joy to hear Ubuntu tips and tricks.  Thank you.
properties (22)
authorbigtom13
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t104541532z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 10:45:42
last_update2018-04-22 10:45:42
depth1
children1
last_payout2018-04-29 10:45:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length345
author_reputation80,689,630,475,233
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,463,771
net_rshares0
@aschatria ·
I have Gmail accounts, but for me it was surprising that it will stop working for the Mutt, but it works just fine with the Mail Utilities. What ever I can do from the command line is  an advantage. Thanks for visiting, I will find more tricks for Linux soon.
properties (22)
authoraschatria
permlinkre-bigtom13-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180423t080909235z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-23 08:08:30
last_update2018-04-23 08:08:30
depth2
children0
last_payout2018-04-30 08:08:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length259
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,633,047
net_rshares0
@daan ·
I use Ubuntu on my work laptop and the command line is always something I really miss when switching back to Windows. I personally use Terminator (if you've heard of that). Allows you to divide your command line into multiple frames. 

For mailing, I usually stick to Thunderbird though ;)
properties (22)
authordaan
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t162434625z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 16:24:36
last_update2018-04-22 16:24:36
depth1
children1
last_payout2018-04-29 16:24:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length289
author_reputation68,495,317,885,928
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,513,575
net_rshares0
@aschatria ·
I have both and use them simultaneously, lol. I described the Terminator in my previous post about the Linux, and some other things too. I don't like too many apps on my screen, and laptop is heating enough w/o a few too many.

As for the email I have Geary which I don't even use, and my fav mail is Proton and Disroot, on mobile. 
This gmail method is for sending fast w/o wasting too much time.
properties (22)
authoraschatria
permlinkre-daan-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t163940196z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 16:39:42
last_update2018-04-22 16:39:42
depth2
children0
last_payout2018-04-29 16:39:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length397
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,515,919
net_rshares0
@hetty-rowan ·
It's a while ago since I used Linux but what I like about Linux is the fact that all is open source, there are tons of applications to get and very much free. Why I stopped using Linux is the fact that I'm an photoshop addict ... and that's not possible on Linux. The switch constantly between Linux and Windows was not my thing. That's why I decided to do everything in Windows again. But Linux is a much safer and more stable workspace.
properties (22)
authorhetty-rowan
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t185319288z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 18:53:18
last_update2018-04-22 18:53:18
depth1
children2
last_payout2018-04-29 18:53:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length438
author_reputation500,555,603,575,848
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,534,936
net_rshares0
@aschatria ·
I thought there are Photoshop look-a-likes for Linux as well? I have Win on my pc and Linux on laptop, so I use the both, and I also have a Photoshop but my usage of it is quite limited ( crop, shade, bleach, move , cut... you know )
properties (22)
authoraschatria
permlinkre-hetty-rowan-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180423t073336656z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-23 07:32:09
last_update2018-04-23 07:32:09
depth2
children1
last_payout2018-04-30 07:32:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length233
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,628,057
net_rshares0
@hetty-rowan ·
Yeah there are some look-a-likes, but I couldn't get used to it. The way of usage differs too much from photoshop, and although it are look-a-likes, you can run into limits which you don't have in photoshop. 

I don't have a laptop now. The one I had give up working last year. So my pc got to do the job for me. :-)
properties (22)
authorhetty-rowan
permlinkre-aschatria-re-hetty-rowan-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180423t074507996z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-23 07:45:06
last_update2018-04-23 07:45:06
depth3
children0
last_payout2018-04-30 07:45:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length316
author_reputation500,555,603,575,848
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,629,827
net_rshares0
@steemiansarena ·
<h4>Your post has been upvoted by the @steemainsarena community trail. Our goal is to support minnows on steemit to help them grow.  You can join our discord server here; https://discord.gg/C88kEjB
You can support us by donating steem/sbd or delegating sp to steemainsarena trail to acknowledge our mission. </h4>
properties (22)
authorsteemiansarena
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t105703966z
categorylinux
json_metadata{"tags":["linux"],"users":["steemainsarena"],"links":["https://discord.gg/C88kEjB"],"app":"steemit/0.1"}
created2018-04-22 10:57:12
last_update2018-04-22 10:57:12
depth1
children0
last_payout2018-04-29 10:57:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length313
author_reputation137,168,100,986
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,465,191
net_rshares0
@teechizzy ·
Linux OS has interesting features I must say but "black hats"  in my areas use it a lot to hack Wi-Fi 
This feature of what Linux OS can do in this post  is mind blowing
properties (22)
authorteechizzy
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t172218435z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 17:23:00
last_update2018-04-22 17:23:00
depth1
children1
last_payout2018-04-29 17:23:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length169
author_reputation516,552,512,615
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,522,543
net_rshares0
@aschatria ·
Money has interesting features as well, but criminals use it to pay illegal activities ....
Every tool can be used in this or that way, Linux is just another operating system. 
That what I showed up there, are basics, and it is very easy to learn it.
properties (22)
authoraschatria
permlinkre-teechizzy-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180423t073148343z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-23 07:30:24
last_update2018-04-23 07:30:24
depth2
children0
last_payout2018-04-30 07:30:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length250
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,627,843
net_rshares0
@warpedpoetic ·
This is quite interesting. Can I do any of this without downloading an application?  I actually need a way to create email accounts as quick as possible but I find this interesting and would like to try it. I use a windows 8 system but it is not currently connected to an internet service.
properties (22)
authorwarpedpoetic
permlinkre-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t090619238z
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2018-04-22 09:06:21
last_update2018-04-22 09:06:21
depth1
children1
last_payout2018-04-29 09:06:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length289
author_reputation109,516,835,772,032
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,451,270
net_rshares0
@aschatria ·
Linux is not an application, it is an open-source operating systems. Your operating system is Windows 8, so no.
The things I explained is NOT to create **email accounts**, it is for sending emails messages, same way you can send them from your Gmail or desktop program, just without any of that.
Why do you actually NEED to create multiple emails AS QUICK AS POSSIBLE? 
https://render.bitstrips.com/v2/cpanel/b0fefbc3-8522-40f4-804c-fcc99d871a23-c1636135-9af4-42af-80fa-1d8a86572b4d-v1.png?transparent=1&palette=1
properties (22)
authoraschatria
permlinkre-warpedpoetic-re-aschatria-linux-mail-program-send-emails-from-terminal-send-emails-from-file-send-multiple-emails-at-once-20180422t091628291z
categorylinux
json_metadata{"tags":["linux"],"image":["https://render.bitstrips.com/v2/cpanel/b0fefbc3-8522-40f4-804c-fcc99d871a23-c1636135-9af4-42af-80fa-1d8a86572b4d-v1.png?transparent=1&amp;palette=1"],"app":"steemit/0.1"}
created2018-04-22 09:15:03
last_update2018-04-22 09:15:03
depth2
children0
last_payout2018-04-29 09:15:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length513
author_reputation39,132,042,091,697
root_title"LINUX - MAIL PROGRAM, SEND EMAILS FROM TERMINAL, SEND EMAILS FROM FILE, SEND MULTIPLE EMAILS AT ONCE"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,452,374
net_rshares0