В моем электронном письме есть заголовок в формате PNG. Заголовок встроен следующим образом:
Код: Выделить всё
[img]cid:emailheader[/img]
var mail = new Почта(от, тема, куда, содержание);
Код: Выделить всё
var headerPath = HttpContext.Current.Server.MapPath("~/Resources/email-header.png");
var attachment = new SendGrid.Helpers.Mail.Attachment();
attachment.ContentId = "emailheader";
attachment.Content = Convert.ToBase64String(File.ReadAllBytes(headerPath));
attachment.Type = "image/png";
attachment.Filename = "email-header.png";
mail.AddAttachment(attachment);
var send = sg.client.mail.send.post(requestBody: mail.Get());

Подробнее здесь: https://stackoverflow.com/questions/388 ... html-email