Esempio n. 1
0
 public static RefDto CreateFrom(MimeMessageEntry messageEntry)
 {
     return(new RefDto
     {
         Subject = messageEntry.Subject,
         CreatedAt = messageEntry.Created?.ToUniversalTime(),
         Id = messageEntry.Id,
         Size = messageEntry.FileSize
     });
 }
Esempio n. 2
0
            public static Dto CreateFrom(MimeMessageEntry messageEntry)
            {
                var mail = messageEntry.MailMessage;

                return(new Dto
                {
                    Subject = messageEntry.Subject,
                    CreatedAt = messageEntry.Created?.ToUniversalTime(),
                    Id = messageEntry.Id,
                    From = ToAddressList(mail?.From),
                    To = ToAddressList(mail?.To),
                    Cc = ToAddressList(mail?.Cc),
                    BCc = ToAddressList(mail?.Bcc),
                    HtmlBody = mail?.HtmlBody,
                    TextBody = mail?.TextBody,
                });
            }
Esempio n. 3
0
            public static DetailDto CreateFrom(MimeMessageEntry messageEntry)
            {
                var mail = messageEntry.MailMessage;

                return(new DetailDto
                {
                    Subject = messageEntry.Subject,
                    CreatedAt = messageEntry.Created?.ToUniversalTime(),
                    Id = messageEntry.Id,
                    From = ToAddressList(mail?.From),
                    To = ToAddressList(mail?.To),
                    Cc = ToAddressList(mail?.Cc),
                    BCc = ToAddressList(mail?.Bcc),
                    HtmlBody = mail?.HtmlBody,
                    TextBody = mail?.TextBody,
                    Headers = (mail?.Headers ?? new HeaderList()).Select(h => new HeaderDto {
                        Name = h.Field, Value = h.Value
                    }).ToList(),
                    Sections = ToSectionDtos(mail?.BodyParts)
                });
            }