The Example is SMTP client demo. It sends and email with attachment to recipient.
## How to use the example
### Configure the project
```
idf.py menuconfig
```
* Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../README.md) for more details.
Please set the following parameters under example config for SMTP client demo to work:
250-smtp.googlemail.com at your service, [182.75.158.118]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCOD
ES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
I (4262) smtp_example: Writing STARTTLS to server...
220 2.0.0 Ready to start TLS
I (4562) smtp_example: Performing the SSL/TLS handshake...
I (5692) smtp_example: Verifying peer X.509 certificate...
I (5692) smtp_example: Certificate verified.
I (5692) smtp_example: Cipher suite is TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
I (5702) smtp_example: Authentication...
I (5702) smtp_example: Write AUTH LOGIN
I (6002) smtp_example: Write USER NAME
I (6302) smtp_example: Write PASSWORD
I (6822) smtp_example: Write MAIL FROM
I (7132) smtp_example: Write RCPT
I (7432) smtp_example: Write DATA
I (8252) smtp_example: Write Content
I (10202) smtp_example: Email sent!
```
## Note:
- You might need to enable permission for less secure apps from email provider. This is because these email providers (e.g. gmail) insist on OAUTH authorization.