Correo is a .NET service for programmatically sending emails
 
 
Go to file
Tudor Stanciu 65626d90db readme 2023-01-21 00:37:24 +02:00
src SendGrid integration 2023-01-20 19:23:28 +02:00
.gitattributes Add .gitattributes, .gitignore, README.md, and LICENSE.txt. 2023-01-17 23:14:03 +02:00
.gitignore Add messaging 2023-01-18 02:12:35 +02:00
Correo.sln SendGrid integration 2023-01-20 19:23:28 +02:00
LICENSE.txt Add .gitattributes, .gitignore, README.md, and LICENSE.txt. 2023-01-17 23:14:03 +02:00
README.md readme 2023-01-21 00:37:24 +02:00
dependencies.props SendGrid integration 2023-01-20 19:23:28 +02:00
directory.build.props dependencies.props 2023-01-18 00:00:48 +02:00
nuget.config nuget.config file 2023-01-17 23:25:50 +02:00

README.md

Correo

Correo is a .NET service for programmatically sending emails. Communication with this service is available through two channels simultaneously:

  • HTTP (via REST API)
  • Pub/Sub Messaging (via NATS)

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

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": "<account>@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 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.