Ejemplo n.º 1
0
 /// <summary>
 /// If you have a token in your application. (Ex: Royal Studio, ) You can use its access key to login web Api.
 /// </summary>
 /// <param name="accessKey">Access Key in your application that logged in</param>
 /// <param name="wsUrl">web api url</param>
 public MailManager(string accessKey, string wsUrl = "http://service.royalqg.com/")
 {
     this.AccessKey = accessKey;
     this.WSUrl     = wsUrl;
     mc             = new Helper.MailManagerCore(accessKey, wsUrl);
     this.qm        = new QueryManager(this.AccessKey, true);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// If you send mail via web api and you don't have any token in your system. You must enter your username, password and api url.
        /// </summary>
        /// <param name="wsUserName">Your royal system username</param>
        /// <param name="wsPassword">Your royal system password</param>
        /// <param name="wsUrl">web api  base url. Default value : http://service.royalqg.com/ </param>
        public MailManager(string wsUserName, string wsPassword, string wsUrl = "http://service.royalqg.com/")
        {
            this.WSUserName = wsUserName;
            this.WSPassword = wsPassword;
            this.WSUrl      = wsUrl;
            Token tk = Token.GetToken(wsUserName, wsPassword);

            if (tk != null)
            {
                this.AccessKey = tk.AccessKey;
            }
            mc      = new Helper.MailManagerCore(wsUserName, wsPassword, wsUrl);
            this.qm = new QueryManager(this.AccessKey, true);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// You must assing db connection string into connectionString parameter.
 /// System will read records from dbo.MailSend table.
 /// </summary>
 /// <param name="connectionString"></param>
 public MailManager(string connectionString)
 {
     this.ConnectionString = connectionString;
     mc = new Helper.MailManagerCore(this.ConnectionString);
     qm = new QueryManager(this.ConnectionString);
 }
Ejemplo n.º 4
0
 public MailManager()
 {
     mc = new Helper.MailManagerCore();
 }