remove cancelation token from ConfigEmailOut
This commit is contained in:
parent
73da768ed3
commit
1b7a42fd7e
@ -27,9 +27,27 @@ public class SendSignedMailHandler : SendMailHandler<DocSignedNotification>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="notification"></param>
|
/// <param name="notification"></param>
|
||||||
/// <param name="emailOut"></param>
|
/// <param name="emailOut"></param>
|
||||||
/// <param name="cancel"></param>
|
protected override void ConfigEmailOut(DocSignedNotification notification, EmailOut emailOut)
|
||||||
protected override void ConfigEmailOut(DocSignedNotification notification, EmailOut emailOut, CancellationToken cancel)
|
|
||||||
{
|
{
|
||||||
emailOut.ReferenceString = notification.EmailAddress;
|
emailOut.ReferenceString = notification.EmailAddress;
|
||||||
|
emailOut.ReferenceId = notification.ReceiverId;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private static string TextToHtml(string input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(input)) return "";
|
||||||
|
|
||||||
|
// HTML encoding special characters
|
||||||
|
string encoded = System.Net.WebUtility.HtmlEncode(input);
|
||||||
|
|
||||||
|
// Convert tabs to (4 non-breaking spaces)
|
||||||
|
encoded = encoded.Replace("\t", " ");
|
||||||
|
|
||||||
|
// Convert line breaks to <br />
|
||||||
|
encoded = encoded.Replace("\r\n", "<br />"); // Windows
|
||||||
|
encoded = encoded.Replace("\r", "<br />"); // Mac old
|
||||||
|
encoded = encoded.Replace("\n", "<br />"); // Unix/Linux
|
||||||
|
|
||||||
|
return encoded;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -127,22 +127,4 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
|||||||
text = text.Replace(ph.Key, ph.Value);
|
text = text.Replace(ph.Key, ph.Value);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string TextToHtml(string input)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(input)) return "";
|
|
||||||
|
|
||||||
// HTML encoding special characters
|
|
||||||
string encoded = System.Net.WebUtility.HtmlEncode(input);
|
|
||||||
|
|
||||||
// Convert tabs to (4 non-breaking spaces)
|
|
||||||
encoded = encoded.Replace("\t", " ");
|
|
||||||
|
|
||||||
// Convert line breaks to <br />
|
|
||||||
encoded = encoded.Replace("\r\n", "<br />"); // Windows
|
|
||||||
encoded = encoded.Replace("\r", "<br />"); // Mac old
|
|
||||||
encoded = encoded.Replace("\n", "<br />"); // Unix/Linux
|
|
||||||
|
|
||||||
return encoded;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.0" />
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.0" />
|
||||||
<PackageReference Include="Scalar.AspNetCore" Version="2.2.1" />
|
<PackageReference Include="Scalar.AspNetCore" Version="2.2.1" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.1.1" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user