Video 76
Se hizo toda la parte del Unit Of Work y estoy a punto de terminar la de tests unitarios
This commit is contained in:
25
CleanArchitectureRedis/MandarCorreo/MandarCorreo.sln
Normal file
25
CleanArchitectureRedis/MandarCorreo/MandarCorreo.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34607.119
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MandarCorreo", "MandarCorreo\MandarCorreo.csproj", "{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CB12919E-932A-4A8F-870B-DFE108FDD721}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
28
CleanArchitectureRedis/MandarCorreo/MandarCorreo/Program.cs
Normal file
28
CleanArchitectureRedis/MandarCorreo/MandarCorreo/Program.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Net.Mail;
|
||||
using System.Net;
|
||||
|
||||
try
|
||||
{
|
||||
SmtpClient client = new SmtpClient("mail.asarmiento.es", 587)
|
||||
{
|
||||
Credentials = new NetworkCredential("alejandro@asarmiento.es", "Toledo.480200"),
|
||||
EnableSsl = true
|
||||
};
|
||||
|
||||
MailMessage mailMessage = new MailMessage
|
||||
{
|
||||
From = new MailAddress("alejandro@asarmiento.es"),
|
||||
Subject = "Vacaciones de este año",
|
||||
Body = "Este año me da que no vamos a tener vacaciones =(",
|
||||
IsBodyHtml = false,
|
||||
};
|
||||
mailMessage.To.Add("alejandro.sarsan@gmail.com");
|
||||
|
||||
client.Send(mailMessage);
|
||||
|
||||
Console.WriteLine("Correo enviado con éxito.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("No se pudo enviar el correo. Error: " + ex.Message);
|
||||
}
|
||||
Reference in New Issue
Block a user