Gmail fails to display inline SVG within HTML emails. See the minimal example below:
// Define a mail object
MailObject mail = new MailObject();
mail.Sender = new EmailAddress("[email protected]", "Notifier");
mail.Recipient = new EmailAddress("[email protected]", "User");
mail.SubjectLine = "Test: SVG in Email";
// Construct the HTML body with an inline SVG
string htmlContent = "<html><body><div style='background:#eee;padding:10px;'><svg width='100' height='100'><rect width='100' height='100' fill='#007acc'/></svg></div></body></html>";
mail.HtmlContent = htmlContent;
// Send the email using a custom SMTP handler
SmtpHandler smtp = new SmtpHandler("smtp.example.com", 465);
smtp.EstablishConnection();
smtp.Transmit(mail);
smtp.TerminateConnection();