title: How to send embedded images with sendgrid emails?
body: <p>I'm starting with SendGrid to send my e-mails, but I coudn't find how to embed images. Without using SendGrid I was using the following code to send e-mails with embedded images:</p>
  
  <pre><code>var mail = new System.Net.Mail.MailMessage();
  mail.Subject = "Warning";
  mail.From = "from_user@test.com";
  mail.To.Add("to_user@test.com");
  mail.IsBodyHtml = true;
  mail.Body = "&lt;html&gt;&lt;body&gt;&lt;a href='http://www.mywebsite.com' title='My Website'&gt;&lt;img src='cid:my_image' alt='My Image' border='0' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h1&gt;My E-mail Title&lt;/h1&gt;E-mail content.&lt;/body&gt;&lt;/html&gt;";
  var av = AlternateView.CreateAlternateViewFromString(mail.Body, null, "text/html");
  av.LinkedResources.Add(new LinkedResource(@"C:\my_image.png", "image/png"){ContentId="my_image"});
  mail.AlternateViews.Add(av);
  var smtp = new SmtpClient("smtp.test.com");
  smtp.Credentials = new NetworkCredential("user", "pass");
  smtp.Send(mail);
  </code></pre>
  
  <p>--- EDITED ---</p>
  
  <p>Now I'm using the following code to send my e-mails (using SendGrid classes).</p>
  
  <pre><code>var message = SendGrid.GetInstance();
  message.Subject = "Warning";
  message.From = new MailAddress("from_user@test.com");
  message.To = new MailAddress[] { new MailAddress("to_user@test.com") };
  message.Html = "&lt;html&gt;&lt;body&gt;&lt;a href='http://www.mywebsite.com' title='My Website'&gt;&lt;img src='cid:my_image' alt='My Image' border='0' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h1&gt;My E-mail Title&lt;/h1&gt;E-mail content.&lt;/body&gt;&lt;/html&gt;";
  var transportSMTP = SMTP.GetInstance(new NetworkCredential("user", "pass"));
  transportSMTP.Deliver(message);
  </code></pre>
  
  <p>What I need to know is how to embed and link my images inside the e-mail using its content id (CID).</p>