private static void ProcessEmailSender(HttpContext context) { if (context.Request["action"] == "getlist") { EmailPlugins emailPlugins = EmailPlugins.Instance(); context.Response.ContentType = "application/json"; context.Response.Write(emailPlugins.GetPlugins().ToJsonString()); return; } if (context.Request["action"] == "getmetadata") { context.Response.ContentType = "text/xml"; EmailSender emailSender = EmailSender.CreateInstance(context.Request["name"]); if (emailSender == null) { context.Response.Write("<xml></xml>"); return; } context.Response.Write(emailSender.GetMetaData().OuterXml); } }
public static EmailSender CreateInstance(string name) { return(EmailSender.CreateInstance(name, null)); }