Skip to content

Commit

Permalink
Adds mail service interface
Browse files Browse the repository at this point in the history
  • Loading branch information
chintans committed Jan 3, 2024
1 parent 8afe48f commit 5bb187d
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Mail/IMailService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Promact.Core.Models;
using System.Threading.Tasks;

namespace Promact.Core.Mail
{
public interface IMailService
{
Task<SendEmailResult> SendEmailAsync(SimpleEmailRequest simpleEmailRequest);
Task<SendEmailResult> SendTemplatedEmailAsync(TemplatedEmailRequest templatedEmailRequest);
}
}
8 changes: 8 additions & 0 deletions Models/SendEmailResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Promact.Core.Models
{
public class SendEmailResult
{
public bool IsSuccess { get; set; }
public string? ErrorMessage { get; set; }
}
}
6 changes: 6 additions & 0 deletions Models/SimpleEmailRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Promact.Core.Models
{
public class SimpleEmailRequest
{
}
}
6 changes: 6 additions & 0 deletions Models/TemplatedEmailRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Promact.Core.Models
{
public class TemplatedEmailRequest
{
}
}
8 changes: 8 additions & 0 deletions Promact.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions Promact.Core.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Promact.Core", "Promact.Core.csproj", "{CF4E708F-CCAF-4929-9ED4-05879CC1AEA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CF4E708F-CCAF-4929-9ED4-05879CC1AEA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF4E708F-CCAF-4929-9ED4-05879CC1AEA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF4E708F-CCAF-4929-9ED4-05879CC1AEA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF4E708F-CCAF-4929-9ED4-05879CC1AEA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4E502DDF-5C02-4E8E-92F3-B5FEE417C357}
EndGlobalSection
EndGlobal

0 comments on commit 5bb187d

Please sign in to comment.