Skip to content

Latest commit

 

History

History
37 lines (35 loc) · 1.38 KB

README.md

File metadata and controls

37 lines (35 loc) · 1.38 KB

csrestcrud

   A C#, .NET Core based REST E-mail sending service using FluentEmail and Swagger.
   Some examples of SMTP server requires a secure connection. Gmail is one of them. Therefore, you have to enable Less Secure Sign-In (or Less secure app access) in your google account.

deployt to production

   Run dotnet publish in dotne cli, then upload the contents of .\CSRestEmail\CSEmail\bin\Debug\net5.0\publish\ int your hosting file manager.

how to use it

   Open project folder, type dotnet run in dotnet cli, access https://localhost:5001/swagger/index.html. Then inside of the post json parameters, type your entries as it follows:

The default port is 587.

{
  "id": 0,
  "eSmtpHost": "smtp server domain",
  "eName": "Your name",
  "eLogin": "your e-mail login",
  "ePassword": "your e-mail password",
  "eTo": "receiver e-mail address",
  "eSubject": "e-mail subject",
  "eBody": "your e-mail message"
}



For example:

{
  "id": 0,
  "eSmtpHost": "smtp-mail.outlook.com",
  "eName": "Filipe",
  "eLogin": "[email protected]",
  "ePassword": "My e-mail password",
  "eTo": "[email protected]",
  "eSubject": "Testing",
  "eBody": "Testing email 123"
}