public static void SendEmail(String from, String To, String Subject, String HTML, String AttachmentPath = null, String AttachmentName = null, MediaTypeNames AttachmentTy
The best deal is definitely to remove the last parameter. Since type is static you don't need a reference to an instance and you can refer to its members from your function body.