Email class

Constructors

Email({required String id, required String userId, required String inboxId, String? domainId, List<String> to = const [], String? from, Sender? sender, EmailRecipients? recipients, String? replyTo, List<String>? cc = const [], List<String>? bcc = const [], Map<String, String>? headers = const {}, Map<String, List<String>>? headersMap = const {}, List<String>? attachments = const [], String? subject, String? body, String? bodyExcerpt, String? bodyMD5Hash, bool? isHTML, String? charset, EmailAnalysis? analysis, required DateTime createdAt, required DateTime updatedAt, required bool read, required bool teamAccess, bool? html})
Returns a new Email instance.

Properties

analysis EmailAnalysis?
getter/setter pair
attachments List<String>?
List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
getter/setter pair
bcc List<String>?
List of BCC recipients email addresses that the email was addressed to. See recipients object for names.
getter/setter pair
body String?
The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests.
getter/setter pair
bodyExcerpt String?
An excerpt of the body of the email message for quick preview .
getter/setter pair
bodyMD5Hash String?
A hash signature of the email message using MD5. Useful for comparing emails without fetching full body.
getter/setter pair
cc List<String>?
List of CC recipients email addresses that the email was addressed to. See recipients object for names.
getter/setter pair
charset String?
Detected character set of the email body such as UTF-8
getter/setter pair
createdAt DateTime
When was the email received by MailSlurp
getter/setter pair
domainId String?
ID of the domain that received the email
getter/setter pair
from String?
Who the email was sent from. An email address - see fromName for the sender name.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
headers Map<String, String>?
Collection of SMTP headers attached to email
getter/setter pair
headersMap Map<String, List<String>>?
Multi-value map of SMTP headers attached to email
getter/setter pair
html bool?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
id String
ID of the email entity
getter/setter pair
inboxId String
ID of the inbox that received the email
getter/setter pair
isHTML bool?
Is the email body content type HTML?
getter/setter pair
read bool
Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks.
getter/setter pair
recipients EmailRecipients?
getter/setter pair
replyTo String?
The replyTo field on the received email message
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sender Sender?
getter/setter pair
subject String?
The subject line of the email message as specified by SMTP subject header
getter/setter pair
teamAccess bool
Can the email be accessed by organization team members
getter/setter pair
to List<String>
List of To recipient email addresses that the email was addressed to. See recipients object for names.
getter/setter pair
updatedAt DateTime
When was the email last updated
getter/setter pair
userId String
ID of user that email belongs to
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) Email?
Returns a new Email instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<Email>?
mapFromJson(dynamic json) Map<String, Email>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<Email>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.