0

I've written a console application which sends out emails, I'm attaching the emails using the BodyBuilder() class like so...

builder.Attachments.Add(path + id + ".docx");

If I send these emails using an on prem exchange server, they're attached and viewable fine, if I send them using Office 365, they're sent and received fine, the attachments are attached fine, however the files appear to be corrupt and can not be viewed.

Do I need to do something extra in order to attach them properly when using Office 365 to send the emails?

Thanks,

mattfullerdev
  • 119
  • 11
  • Sending messages via Office365 using MailKit seems to work fine for other developers. WHat, exactly, is the issue? The only way to know what the issue is would be to see the raw MIME of the messages you are sending. Is the problem on MailKit's end in encoding the MIME or is the problem somewhere along the route the message travels from point A to point B? – jstedfast Apr 24 '20 at 12:49
  • Since you say that sending the same message via MailKit but using a *different* SMTP server works fine, that suggests the problem isn't the MIME encoding, but no one can possibly know for certain without looking at the raw MIME. – jstedfast Apr 24 '20 at 12:51

0 Answers0