toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'type': type,
    'from': from.map((item) => item.toJson()).toList(),
    'to': to.map((item) => item.toJson()).toList(),
    'cc': cc.map((item) => item.toJson()).toList(),
    'bcc': bcc.map((item) => item.toJson()).toList(),
    'received': received,
    'subject': subject,
    'html': html.toJson(),
    'text': text.toJson(),
    'attachments': attachments.map((item) => item.toJson()).toList(),
    'metadata': metadata.toJson(),
    'server': server,
  };
}