toJson method
Encodes this object as JSON.
Implementation
JsonMap toJson() => {
'id': id,
'from': from,
'reply_to': replyTo,
'to': to,
'subject': subject,
'message_id': messageId,
'size': size,
'spam_score': spamScore,
'bounce': bounce,
'cc': cc,
'date': date,
'in_reply_to': inReplyTo,
'references': references,
'auto_submitted': autoSubmitted,
'html_body': htmlBody,
'plain_body': plainBody,
'reply_from_plain_body': replyFromPlainBody,
'attachments': [for (final a in attachments) a.toJson()],
'headers': ?headers,
};