public MessageBuilder WithEmbeddedFile(string path) { FilePath = path; if (EmbedBuilder.Exists()) { if (Path.HasExtension(path)) { if (Path.GetExtension(path).ToLower().EqualsAny(".png", ".gif", ".jpg", ".jpeg")) { if (!EmbedBuilder.ImageUrl.Exists()) { EmbedBuilder.WithLocalImageUrl(path); } } } } return(this); }