public static string ToStringContent(this IMailTemplate template) { using (var stream = template.GetStream()) using (var sr = new StreamReader(stream)) return(sr.ReadToEnd()); }