public string CreateBookletSample() { if (!Directory.Exists(Path.Combine(System.Web.HttpRuntime.AppDomainAppPath, "BookletParams"))) { Directory.CreateDirectory(Path.Combine(System.Web.HttpRuntime.AppDomainAppPath, "BookletParams")); } int returnMainRun = 0; //List<string> mailSetup = new List<string>() { "smtp.quantis.it", "*****@*****.**", "7u6ndYMW", "*****@*****.**", "*****@*****.**" }; List <string> mailSetup = new List <string>() { "asmtp.mail.hostpoint.ch", "*****@*****.**", "yYC3HcWs", "*****@*****.**", "*****@*****.**" }; var listaContratti = new Dictionary <string, string>(); listaContratti.Add("4971", "Assegni (SLA) (Mew)"); listaContratti.Add("5980", "Centro Nazionale Assegni (SLA) (Mew)"); int userId = 0; var MainPath = @"e:\booklet"; Int32.TryParse("2095".Trim(), out userId); // bookletDocumentId = "1105".Trim(); var bookletDocumentId = "1080".Trim(); Class5 createbooklet = new Class5(MainPath); returnMainRun = createbooklet.CreateBooklet(listaContratti, userId, bookletDocumentId, mailSetup); return(returnMainRun + ""); }