FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

Added support for Inline images for SmtpSender

Open austinpn opened this issue 4 years ago • 3 comments

Changed System.Net.Mime.ContentDisposition.Inline to match Core.Models.Attachment.IsInline. Attachment's Content-Disposition header will be set to "inline" instead of "attachment" when attachment is marked inline, allowing it to be referenced by content-id when using SmtpSender.

austinpn avatar Aug 06 '21 02:08 austinpn

I had this issue also. I was already fixing the branch until I saw this pull request. Please add an unit test @austinpn

wilkovanderveen avatar Apr 26 '22 12:04 wilkovanderveen

There is not really a good way to test this without parsing the email on the other end, or exposing CreateMailMessage(IFluentEmail email) in SmtpSender. I can test that a message is sent, but that asserts to true regardless of System.Net.Mail.Attachment.ContentDisposition.Inline correctly mirroring Core.Models.Attachment.IsInline.

austinpn avatar Apr 28 '22 04:04 austinpn

@austinpn I added some tests to a new pull request i created. I am not very expirienced with the github way of contributing, so forgive for not adding it to your PR (if possible))

wilkovanderveen avatar Apr 28 '22 12:04 wilkovanderveen