Exemple #1
0
        public SmsMessage FromMagetMessage(MagnetMessage magnetMessage)
        {
            var sms = new SmsMessage
            {
                Id         = magnetMessage.Id,
                From       = magnetMessage.From,
                To         = magnetMessage.To[0],
                ReceivedAt = magnetMessage.ReceivedAt,
                Body       = magnetMessage.Body,
                Properties = new Dictionary <string, string>(
                    magnetMessage.GetPropertiesFiltered("Html", "Subject"))
            };

            return(sms);
        }
Exemple #2
0
        public EmailMessage FromMagetMessage(MagnetMessage magnetMessage)
        {
            var email = new EmailMessage
            {
                Id         = magnetMessage.Id,
                From       = magnetMessage.From,
                To         = new List <string>(magnetMessage.To),
                ReceivedAt = magnetMessage.ReceivedAt,
                Text       = magnetMessage.Body,
                Html       = magnetMessage.GetPropertyValue <string>("Html"),
                Subject    = magnetMessage.GetPropertyValue <string>("Subject"),
                Properties = new Dictionary <string, string>(
                    magnetMessage.GetPropertiesFiltered("Html", "Subject"))
            };

            return(email);
        }