Open jovball opened 2 years ago
You can create a decorator for the mail sender and check the content there.
/// <summary>
/// Decorator for <c>FluentEmail.Core.Interfaces.ISender</c>.
/// </summary>
public class CustomMailSender : ISender
{
...
}
I use Autofac to register the decorator.
builder.RegisterDecorator<CustomMailSender, ISender>();
This is independent of the type of mail sender you are actually using (smtp, sendgrid...).
For more info, I would suggest stackoverflow or discussions here.
I have a business case for capturing the rendered email body. Is that possible with FluentEmail? I am using Razor templates if that makes any difference.