From 444548f9b3bb6cdfffee10c3ab08f9a67236c52c Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 21 Jan 2023 00:34:53 +0200 Subject: [PATCH] readme --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0d57e60..bc642ee 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,59 @@ # Correo -Correo is a .NET service with the role of programmatically sending emails. -It can integrate with: +Correo is a .NET service with the role of programmatically sending emails. Communication with this service is available through two channels simultaneously: +* HTTP (via REST API) +* Pub/Sub Messaging (NATS) -**SMTP servers:** -* local servers +It can be integrated with several types of mediators, the configuration being the following: + +```"SmtpMediator": "SendGrid" //.NET, MailKit, SendGrid``` + +## Mediators + +### SMTP servers: +* Local servers * Gmail * Yahoo -**Transactional Email APIs:** -* SendGrid \ No newline at end of file +The integration with SMTP servers can be done through two libraries (.NET / MailKit), and the configuration area looks like this: + +``` +"SmtpMediator": "MailKit", +"SmtpClient": { + "Server": "smtp.gmail.com", + "Port": "587", + "UseAuthentication": true, + "Authentication": { + "UserName": "@gmail.com", + "Domain": "", + "Password": "********" + }, + "EnableSsl": true, + "TrustServer": false +} +``` + +### Transactional Email APIs: +#### SendGrid + +SendGrid is a cloud-based SMTP provider that allows you to send emails without having to maintain email servers. It has an excellent and easy-to-use email API with a free plan that allows you to send 100 emails per day. +For this integration, the setup is very simple. All you need is an API Key generated from the [SendGrid](https://app.sendgrid.com/) platform. Afterwards, this API Key will be configured in Correo as below: + +``` +"SmtpMediator": "SendGrid" +"SmtpService": { + "ApiKey": "xxxxxxxxxxx" +} +``` + +## Database +The database is SQLite. This is created automatically at the first start of the service if it is missing. The path where the database is stored can be configured as follows: + +``` +"Workspace": "workspace", +"ConnectionStrings": { + "DatabaseConnection": "Data Source={Workspace}\\correo.db" +} +``` + +For the moment, the only purpose of the database is to store the logs generated by Serilog. \ No newline at end of file