FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

MailKitSender - make it possible to preprocess MimeMessage instances after creation before sending

Open emayevski opened this issue 1 year ago • 0 comments

Current implementation of Send and SendAsync calls CreateMailMessage() to create an instance of MimeMessage. After that, the message can be DKIM-signed. The problem is that CreateMailMessage() is a private method, and there's no other place to hook into the process. My suggestion/request is that either CreateMailMessage is made virtual protected, or there's another virtual protected method introduced, which would be called after CreateMailMessage completes. The first option is of course simpler and require changing one word (private) to two. Then, one would be able to subclass the MailKitSender class and override the method, adding the necessary functionality.

emayevski avatar Aug 29 '24 09:08 emayevski