Ejemplo n.º 1
0
 public static DataTypes.SendEmailResult ParseSendEmailResultJson(string jsonResponse)
 {
     var root = JObject.Parse(jsonResponse);
     var messageIdParent = root.Descendants().Where(x => x.SelectToken("MessageId", false) != null).FirstOrDefault();
     var messageId = messageIdParent != null ? messageIdParent["MessageId"].Value<string>() : string.Empty;
     var results = new DataTypes.SendEmailResult() { MessageId = messageId };
     return results;
 }
Ejemplo n.º 2
0
 public static DataTypes.SendEmailResult ParseSendEmailResult(string xmlResponse)
 {
     var root = XElement.Parse(xmlResponse);
     var messageId = root.Descendants(SesNs + "MessageId").FirstOrDefault();
     var results = new DataTypes.SendEmailResult() {MessageId = messageId != null ? messageId.Value : string.Empty};
     return results;
 }