Exemplo n.º 1
0
        static Notifyd.Core.Models.MessageEntity CreateEntity()
        {
            Notifyd.Core.Models.MessageEntity msg = new Notifyd.Core.Models.MessageEntity("0",Convert.ToString(Guid.NewGuid()));

            msg.Subject = "Agent Test";
            msg.Status = "1";
            msg.Transport = "sendgrid";
            msg.Body = "Test sent @ " + System.DateTime.Now.ToString();
            msg.FromDisplay = "Notifyd";
            msg.FromAddress = "*****@*****.**";
            msg.ToAddress = "*****@*****.**";
            msg.SubmittedOn = System.DateTime.Now.ToString();

            return msg;
        }
Exemplo n.º 2
0
        public static void CreateMessage(string org, string subject, string body, string fromDisplay, string fromAddress, string toAddress)
        {
            MessageEntity msg = new MessageEntity(org, Convert.ToString(Guid.NewGuid()));

               msg.Subject = subject;
            msg.Status = "1";
            msg.Transport = "sendgrid";
            msg.Body = body;
            msg.FromDisplay =  fromDisplay;
            msg.FromAddress = fromAddress;
            msg.ToAddress =  toAddress;
            msg.SubmittedOn = System.DateTime.Now.ToString();

            Console.WriteLine("Calling Message Manager");
            CreateMessage(msg);
        }