Beispiel #1
0
        public static void Run()
        {
            // ExStart:1
            EmailApi   emailApi   = new EmailApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            String fileName     = "email_test.eml";
            String propertyName = "Body";
            String storage      = "";
            String folder       = "";

            try
            {
                // Upload source file to aspose cloud storage
                storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName));

                // Invoke Aspose.Email Cloud SDK API to get message property
                EmailPropertyResponse apiResponse = emailApi.GetEmailProperty(propertyName, fileName, storage, folder);

                if (apiResponse != null)
                {
                    Console.WriteLine("Property Name :: " + apiResponse.EmailProperty.Name);
                    Console.WriteLine("Property Value :: " + apiResponse.EmailProperty.Value);
                    Console.WriteLine("Get message property by name, Done!");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
Beispiel #2
0
        public static void Run()
        {
            // ExStart:1
            EmailApi   emailApi   = new EmailApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            String fileName   = "email_test2.eml";
            String attachName = "README.TXT";
            String storage    = "";
            String folder     = "";

            try
            {
                // Upload source file to aspose cloud storage
                storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName));

                // Invoke Aspose.Email Cloud SDK API to download attachment from email
                ResponseMessage apiResponse = emailApi.GetEmailAttachment(fileName, attachName, storage, folder);

                if (apiResponse != null)
                {
                    System.IO.File.WriteAllBytes(Common.GetDataDir() + attachName, apiResponse.ResponseStream);
                    Console.WriteLine("Download Attachment from Email, Done!");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
        public static void Run()
        {
            // ExStart:1
            EmailApi   emailApi   = new EmailApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            String name     = "email_test";
            String fileName = name + ".eml";
            String format   = "msg";
            String storage  = "";
            String folder   = "";
            String outPath  = "";

            try
            {
                // Upload source file to aspose cloud storage
                storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName));

                // Invoke Aspose.Email Cloud SDK API to convert email to other formats
                ResponseMessage apiResponse = emailApi.GetDocumentWithFormat(fileName, format, storage, folder, outPath);

                if (apiResponse != null)
                {
                    System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream);
                    Console.WriteLine("Convert Emails to Other Formats, Done!");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
        public Task SendAsync(IdentityMessage message)
        {
            EmailApi.SendEmail(new EmailMessage
            {
                Body        = message.Body,
                Destination = message.Destination,
                Subject     = message.Subject
            });

            return(Task.FromResult(0));
        }
        public void TestGetDocument()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name    = "email_test.eml";
            string storage = null;
            string folder  = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + name));

            EmailDocument actual;

            actual = target.GetDocument(name, storage, folder);

            Assert.AreNotEqual(null, actual);
            Assert.IsInstanceOfType(new EmailDocument(), actual.GetType());
        }
        public void TestPostAddEmailAttachment()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name       = "email_test.eml";
            string attachName = "email_test.eml";
            string storage    = null;
            string folder     = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + name));

            EmailDocumentResponse actual;

            actual = target.PostAddEmailAttachment(name, attachName, storage, folder);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new EmailDocumentResponse(), actual.GetType());
        }
Beispiel #7
0
        public void TestGetEmailProperty()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string propertyName = "Body";
            string name         = "email_test.eml";
            string storage      = null;
            string folder       = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes(Common.GetDataDir() + name));

            EmailPropertyResponse actual;

            actual = target.GetEmailProperty(propertyName, name, storage, folder);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new EmailPropertyResponse(), actual.GetType());
        }
Beispiel #8
0
        public void TestGetEmailAttachment()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name       = "email_test2.eml";
            string attachName = "README.TXT";
            string storage    = null;
            string folder     = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes(Common.GetDataDir() + name));

            ResponseMessage actual;

            actual = target.GetEmailAttachment(name, attachName, storage, folder);

            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new ResponseMessage(), actual.GetType());
        }
        public void TestGetDocumentWithFormat()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name    = "email_test.eml";
            string format  = "msg";
            string storage = null;
            string folder  = null;
            string outPath = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + name));

            ResponseMessage actual;

            actual = target.GetDocumentWithFormat(name, format, storage, folder, outPath);

            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new ResponseMessage(), actual.GetType());
        }
        public void TestPutSetEmailProperty()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string        name         = "email_test.eml";
            string        propertyName = "Body";
            string        storage      = null;
            string        folder       = null;
            EmailProperty body         = new EmailProperty();

            body.Name  = "Subject";
            body.Value = "This is the subject";

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + name));

            EmailPropertyResponse actual;

            actual = target.PutSetEmailProperty(name, propertyName, storage, folder, body);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new EmailPropertyResponse(), actual.GetType());
        }
        public void TestPutCreateNewEmail()
        {
            EmailApi   target     = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name    = "email_test.eml";
            string storage = null;
            string folder  = null;

            EmailDocument body = new EmailDocument();

            EmailProperties emailProperties = new EmailProperties();

            System.Collections.Generic.List <Link> links             = new System.Collections.Generic.List <Link> {
            };
            System.Collections.Generic.List <EmailProperty> empProps = new System.Collections.Generic.List <EmailProperty> {
            };


            Link link = new Link();

            link.Href  = "http://api.aspose.com/v1.1/pdf/";
            link.Rel   = "self";
            link.Title = "NewField";
            link.Type  = "link";
            links.Add(link);


            EmailProperty emailBody = new EmailProperty();
            EmailProperty emailTo   = new EmailProperty();
            EmailProperty emailFrom = new EmailProperty();

            emailBody.Name  = "Body";
            emailBody.Value = "This is the Body";
            emailBody.Link  = link;
            empProps.Add(emailBody);

            emailTo.Name  = "To";
            emailTo.Value = "*****@*****.**";
            emailTo.Link  = link;
            empProps.Add(emailTo);

            emailFrom.Name  = "From";
            emailFrom.Value = "*****@*****.**";
            emailFrom.Link  = link;
            empProps.Add(emailFrom);


            emailProperties.List = empProps;
            emailProperties.Link = link;

            body.DocumentProperties = emailProperties;
            body.Links = links;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + name));

            EmailDocumentResponse actual;

            actual = target.PutCreateNewEmail(name, storage, folder, body);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new EmailDocumentResponse(), actual.GetType());
        }
Beispiel #12
0
 public void Init()
 {
     instance = new EmailApi();
 }
Beispiel #13
0
        public static void Run()
        {
            // ExStart:1
            EmailApi   emailApi   = new EmailApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            String name     = "email_test";
            String fileName = name + ".eml";
            String storage  = "";
            String folder   = "";

            EmailDocument body = new EmailDocument();

            EmailProperties emailProperties = new EmailProperties();

            System.Collections.Generic.List <Link> links             = new System.Collections.Generic.List <Link> {
            };
            System.Collections.Generic.List <EmailProperty> empProps = new System.Collections.Generic.List <EmailProperty> {
            };


            Link link = new Link();

            link.Href  = "http://api.aspose.com/v1.1/pdf/";
            link.Rel   = "self";
            link.Title = "NewField";
            link.Type  = "link";
            links.Add(link);


            EmailProperty emailBody = new EmailProperty();
            EmailProperty emailTo   = new EmailProperty();
            EmailProperty emailFrom = new EmailProperty();

            emailBody.Name  = "Body";
            emailBody.Value = "This is the Body";
            emailBody.Link  = link;
            empProps.Add(emailBody);

            emailTo.Name  = "To";
            emailTo.Value = "*****@*****.**";
            emailTo.Link  = link;
            empProps.Add(emailTo);

            emailFrom.Name  = "From";
            emailFrom.Value = "*****@*****.**";
            emailFrom.Link  = link;
            empProps.Add(emailFrom);


            emailProperties.List = empProps;
            emailProperties.Link = link;

            body.DocumentProperties = emailProperties;
            body.Links = links;

            try
            {
                // Invoke Aspose.Email Cloud SDK API to add new email
                EmailDocumentResponse apiResponse = emailApi.PutCreateNewEmail(fileName, storage, folder, body);

                if (apiResponse != null)
                {
                    Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null);
                    System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, storageRes.ResponseStream);
                    Console.WriteLine("Add New Email, Done!");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
        public async Task <ActionResult> Register(RegisterViewModel model)
        {
            if (this.ModelState.IsValid)
            {
                var user = new ApplicationUser {
                    UserName = model.Email, Email = model.Email
                };
                var result = await this.UserManager.CreateAsync(user, model.Password);

                if (result.Succeeded)
                {
                    await this.SignInManager.SignInAsync(user, false, false);

                    // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771
                    // Send an email with this link
                    var code = await this.UserManager.GenerateEmailConfirmationTokenAsync(user.Id);

                    var callbackUrl = this.Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, this.Request.Url.Scheme);

                    await this.UserManager.SendEmailAsync(user.Id, "Confirm your account", EmailApi.CreateAccountConfirmationBody(user.UserName, callbackUrl, "Temporary body"));

                    return(this.RedirectToAction("Index", "Home"));
                }

                this.AddErrors(result);
            }

            // If we got this far, something failed, redisplay form
            return(this.View(model));
        }
Beispiel #15
0
 public EmailClient(string username, string password)
 {
     this.emailApi = new EmailApi(username, password);
 }
        public static void Main(String[] args)
        {
            string APIKEY   = "xxxxxx";
            string APPSID   = "xxxxxx";
            string BASEPATH = "http://api.aspose.cloud/v1.1";


///*
//*  Working with Email
//*  Convert Emails to Other Formats
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String name = "email_test";
//String fileName = name + ".eml";
//String format = "msg";
//String storage = "";
//String folder = "";
//String outPath = "";

//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    ResponseMessage apiResponse = emailApi.GetDocumentWithFormat(fileName, format, storage, folder, outPath);

//    if (apiResponse != null)
//    {
//        //download appended document from storage server
//        System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, apiResponse.ResponseStream);
//        Console.WriteLine("Convert Emails to Other Formats, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



///*
//*  Working with Email
//*  Add New Email
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String name = "email_test";
//String fileName = name + ".eml";
//String storage = "";
//String folder = "";

//EmailDocument body = new EmailDocument();

//EmailProperties emailProperties = new EmailProperties();

//System.Collections.Generic.List<Link> links = new System.Collections.Generic.List<Link> { };
//System.Collections.Generic.List<EmailProperty> empProps = new System.Collections.Generic.List<EmailProperty> { };


//Link link = new Link();
//link.Href = "http://api.aspose.cloud/v1.1/pdf/";
//link.Rel = "self";
//link.Title = "NewField";
//link.Type = "link";
//links.Add(link);


//EmailProperty emailBody = new EmailProperty();
//EmailProperty emailTo = new EmailProperty();
//EmailProperty emailFrom = new EmailProperty();

//emailBody.Name = "Body";
//emailBody.Value = "This is the Body";
//emailBody.Link = link;
//empProps.Add(emailBody);

//emailTo.Name = "To";
//emailTo.Value = "*****@*****.**";
//emailTo.Link = link;
//empProps.Add(emailTo);

//emailFrom.Name = "From";
//emailFrom.Value = "*****@*****.**";
//emailFrom.Link = link;
//empProps.Add(emailFrom);


//emailProperties.List = empProps;
//emailProperties.Link = link;

//body.DocumentProperties = emailProperties;
//body.Links = links;

//try
//{
//    //invoke Aspose.PDF Cloud SDK API to append word document
//    EmailDocumentResponse apiResponse = emailApi.PutCreateNewEmail(fileName, storage, folder, body);

//    if (apiResponse != null)
//    {
//        //download appended document from storage server
//        Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null);
//        System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, storageRes.ResponseStream);
//        Console.WriteLine("Add New Email, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



///*
//*  Working with Attachments
//*  Download Attachment from Email
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String fileName = "email_test2.eml";
//String attachName = "README.TXT";
//String storage = "";
//String folder = "";

//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    ResponseMessage apiResponse = emailApi.GetEmailAttachment(fileName, attachName, storage, folder);

//    if (apiResponse != null)
//    {
//        //download appended document from storage server
//        System.IO.File.WriteAllBytes("\\temp\\new_" + attachName, apiResponse.ResponseStream);
//        Console.WriteLine("Download Attachment from Email, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



///*
//*  Working with Attachments
//*  Add email attachment
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String fileName = "email_test.eml";
//String attachName = "README.TXT";
//String storage = "";
//String folder = "";

//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));
//    storageApi.PutCreate(attachName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + attachName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    EmailDocumentResponse apiResponse = emailApi.PostAddEmailAttachment(fileName, attachName, storage, folder);


//    if (apiResponse != null)
//    {
//        //download appended document from storage server
//        Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null);
//        System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, storageRes.ResponseStream);
//        Console.WriteLine("Add email attachment, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



///*
//*  Working with Email Properties
//*  Retrieve Message Properties
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String fileName = "email_test.eml";
//String storage = "";
//String folder = "";

//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    EmailDocument apiResponse = emailApi.GetDocument(fileName, storage, folder);

//    if (apiResponse != null)
//    {
//     foreach(EmailProperty emailProperty in apiResponse.DocumentProperties.List){

//        Console.WriteLine("Property Name :: " + emailProperty.Name);
//        Console.WriteLine("Property Value :: " + emailProperty.Value);
//     }
//        Console.WriteLine("Retrieve Message Properties, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



///*
//*  Working with Email Properties
//*  Set Message Property
//*/

//EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
//StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

//String fileName = "email_test.eml";
//String propertyName = "Subject";
//String storage = "";
//String folder = "";

//EmailProperty emailSubject = new EmailProperty();
//emailSubject.Name = "Subject";
//emailSubject.Value = "This is a new subject";



//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    EmailPropertyResponse apiResponse = emailApi.PutSetEmailProperty(fileName, propertyName, storage, folder, emailSubject);

//    if (apiResponse != null)
//    {
//        Console.WriteLine("Property Name :: " + apiResponse.EmailProperty.Name);
//        Console.WriteLine("Property Value :: " + apiResponse.EmailProperty.Value);
//        Console.WriteLine("Set Message Property, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



/*
 *  Working with Email Properties
 *  Get message property by name
 */

            EmailApi   emailApi   = new EmailApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            String fileName     = "email_test.eml";
            String propertyName = "Body";
            String storage      = "";
            String folder       = "";

            try
            {
                //upload source file to aspose cloud storage
                storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

                //invoke Aspose.PDF Cloud SDK API to append word document
                EmailPropertyResponse apiResponse = emailApi.GetEmailProperty(propertyName, fileName, storage, folder);

                if (apiResponse != null)
                {
                    Console.WriteLine("Property Name :: " + apiResponse.EmailProperty.Name);
                    Console.WriteLine("Property Value :: " + apiResponse.EmailProperty.Value);
                    Console.WriteLine("Get message property by name, Done!");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }



            ///*
            //*  Working with Email
            //*  Convert Emails to Other Formats
            //*/

            //EmailApi emailApi = new EmailApi(APIKEY, APPSID, BASEPATH);
            //StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            //String name = "email_test";
            //String fileName = name + ".eml";
            //String format = "msg";
            //String storage = "";
            //String folder = "";
            //String outPath = "";

            //try
            //{
            //    //upload source file to aspose cloud storage
            //    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\email\\resources\\" + fileName));

            //    //invoke Aspose.PDF Cloud SDK API to append word document
            //    ResponseMessage apiResponse = emailApi.GetDocumentWithFormat(fileName, format, storage, folder, outPath);

            //    if (apiResponse != null)
            //    {
            //        //download appended document from storage server
            //        System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, apiResponse.ResponseStream);
            //        Console.WriteLine("Convert Emails to Other Formats, Done!");
            //        Console.ReadKey();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

            //}
//
//end...
//
        }