Esempio n. 1
0
        public ResultModel SendMail(SendPostModel msg, TokenResult token)
        {
            var client = new WebRequest2();
            var data   = new Dictionary <string, string>
            {
                { "From", msg.From },
                { "To", msg.To },
                { "Reply", msg.Reply },
                { "Cc", msg.Cc },
                { "Bcc", msg.Bcc },
                { "Subject", msg.Subject },
                { "Body", msg.Body }
            };
            var resultData = client.PostForm("https://api.mail2inbox.com/api/send", data, token.access_token);

            return(resultData.ParseJson <ResultModel>());
        }
Esempio n. 2
0
        public ResultModel AddMember(string firstName, string lastName, string email, int listId, TokenResult token)
        {
            var client = new WebRequest2();
            var data   = new Dictionary <string, string>
            {
                { "Email", email },
                { "FirstName", firstName },
                { "LastName", lastName },
                { "ListId", listId.ToString() }
            };
            var resultData = client.PostForm("https://api.mail2inbox.com/api/Member", data, token.access_token);

            return(resultData.ParseJson <ResultModel>());
        }