From e4130c29ba483cbad2b88f187cc4c34f492bdeb2 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sun, 29 Jan 2023 00:33:27 +0200 Subject: [PATCH] small fix --- README.md | 2 -- src/Correo.Mailgun/Extensions/ModelExtensions.cs | 2 +- src/Correo.PublishedLanguage/Commands/SendEmail.cs | 2 +- src/Correo.PublishedLanguage/Correo.PublishedLanguage.csproj | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e39e0e7..ede41fa 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,5 @@ This configuration area is: } ``` -For the moment, the only purpose of the database is to store the logs generated by Serilog. - ## Hosting The only hosting environment tested for this service is Docker, but considering that .NET 6 is cross platform, it can most likely be hosted in any environment. \ No newline at end of file diff --git a/src/Correo.Mailgun/Extensions/ModelExtensions.cs b/src/Correo.Mailgun/Extensions/ModelExtensions.cs index ca29b08..81ff4c1 100644 --- a/src/Correo.Mailgun/Extensions/ModelExtensions.cs +++ b/src/Correo.Mailgun/Extensions/ModelExtensions.cs @@ -7,7 +7,7 @@ namespace Correo.Mailgun.Extensions internal static class ModelExtensions { public static string ToMailgunAddress(this EmailMessage.MailAddress address) - => $"{address.DisplayName} <{address.Address}>"; + => string.IsNullOrEmpty(address.DisplayName) ? address.Address : $"{address.DisplayName} <{address.Address}>"; public static string ToMailgunAddresses(this IEnumerable addresses) { diff --git a/src/Correo.PublishedLanguage/Commands/SendEmail.cs b/src/Correo.PublishedLanguage/Commands/SendEmail.cs index e30bd59..91ffe27 100644 --- a/src/Correo.PublishedLanguage/Commands/SendEmail.cs +++ b/src/Correo.PublishedLanguage/Commands/SendEmail.cs @@ -13,6 +13,6 @@ namespace Correo.PublishedLanguage.Commands public IEnumerable Bcc { get; init; } public bool IsBodyHtml { get; init; } - public record MailAddress(string Address, string DisplayName); + public record MailAddress(string Address, string DisplayName = null); } } diff --git a/src/Correo.PublishedLanguage/Correo.PublishedLanguage.csproj b/src/Correo.PublishedLanguage/Correo.PublishedLanguage.csproj index 611d228..b7b27e4 100644 --- a/src/Correo.PublishedLanguage/Correo.PublishedLanguage.csproj +++ b/src/Correo.PublishedLanguage/Correo.PublishedLanguage.csproj @@ -2,7 +2,7 @@ net6.0 - 1.0.0 + 1.0.1 correo.png Correo published language