# lightweight email client

## install
```
sudo apt install msmtp-mta mailutils
```

## configure
edit `/etc/msmtprc`:
```
# A system wide configuration file is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.

defaults
# Port 587 is preferred, because ISPs often block port 25
port 587
tls on
tls_starttls on
logfile /var/log/mail.log

account default
host $server
# Envelope-from address
from root@hostname
# Authentication
auth on
user $user
password $password
```
since you will be putting a plaintext password in this config file, make sure it's only readable by root:
```
chmod og-r /etc/msmtprc
```

## test
you can test if you can connect to the server by running:
```
msmtp -Sd
```
or try sending yourself an email by running:
```
echo "this is a test" | mail -s "testing" youremail@yourdomain
```