# Configuring E-Mail services

1. We need to install some mail services as mentioned below.

```bash
sudo apt-get update -y
sudo apt-get install mailutils
sudo apt-get install ssmtp
```

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2F0VmeUpqhTScr64Tjq5J7%2Fimage.png?alt=media&#x26;token=e0598640-2e30-43ed-ab18-c917a094a531" alt=""><figcaption></figcaption></figure>

2. Now, navigate to your google account and click on settings. Navigate to enable the two step authentication method.

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2FvrMsXH5IU7THksRCqzOp%2Fimage.png?alt=media&#x26;token=c8bc6892-067e-472e-8faa-7be565723fcc" alt=""><figcaption></figcaption></figure>

3. Go to security setting >> click on app password >>click on other > give name and generate password

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2FHTOejOT8TladSwURQIW2%2Fimage.png?alt=media&#x26;token=33641b3e-9cf4-4ad7-83a3-0158937bff48" alt=""><figcaption></figcaption></figure>

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2F13SwwMhiqCVNzLHV8ffy%2Fimage.png?alt=media&#x26;token=8a649250-0b00-4480-9a14-612181414d7d" alt=""><figcaption></figcaption></figure>

4. &#x20;Copy the password from above and follow the below commands.

```
cd /etc/ssmtp
vim ssmtp.conffile
```

5. Configure the settings in the ssmtp.conffile

```
root=bandan5121998@gmail.com
mailhub=smtp.gmail.com:485
AuthUser=bandan5121998@gmail.com
AuthPass=abfamgtxphxiwcat
UseSTARTTLS=yes
FromLineOverride=YES
hostname=localhost
```

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2FXxXmlnRi6MNnrGSmkcxf%2Fimage.png?alt=media&#x26;token=012aafbb-65c7-472a-942a-192d8028e4eb" alt=""><figcaption></figcaption></figure>

6. Open the SMTPS port in AWS console as shown below.

<figure><img src="https://389859271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR9yUYsBi0Y1eeEpTEqSa%2Fuploads%2FdSYv51FFpCdFlOxm3pwc%2Fimage.png?alt=media&#x26;token=a8cc73ad-818e-47a0-89bd-edb94ee16d0f" alt=""><figcaption></figcaption></figure>
