Send mail is a cli application for sending email using smtp server.
Installation
1
| sudo apt install sendmail
|
1
2
3
4
5
6
7
8
9
10
11
| # Config path "/etc/ssmtp/ssmtp.conf"
# The person who gets all mail for userids < 1000
root=<root-email-id-for-receiving-fallback-email-to-owner>
#SMTP Config
mailhub=smtp.gmail.com:587
AuthUser=<gmail-id>
AuthPass=<app-password>
UseTLS=YES
UseSTARTTLS=YES
From=<from-email-aliases>
FromLineOverride=YES
|
Sending Test Email
1
2
3
4
5
6
7
8
9
| $ sendmail receipient@example.com
To: recipient@example.com
From: Your Name<your-aliases@domain.com>
Subject: This is Subject
Email body will start after a line gap from subject line.
Rest of the text is email body.
When email body finished, hit enter for new line.
Then press Ctrl+d key to send the email.
|
Note: When system is throwing error or invalid login attempt then it will send email to root
email id,