Class EmailPreview
Preview of an email message. For full message (including body and attachments) call the getEmail or other email endpoints with the provided email ID.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "EmailPreview")]
public class EmailPreview : IValidatableObject
Constructors
View SourceEmailPreview()
Initializes a new instance of the EmailPreview class.
Declaration
[JsonConstructor]
protected EmailPreview()
EmailPreview(Guid, Guid?, Guid?, string, List<string>, string, List<string>, List<string>, DateTime, bool, List<string>, Guid?, string, string, Sender, EmailRecipients, bool?, List<string>, Guid?, long?)
Initializes a new instance of the EmailPreview class.
Declaration
public EmailPreview(Guid id = default, Guid? inboxId = null, Guid? domainId = null, string subject = null, List<string> to = null, string from = null, List<string> bcc = null, List<string> cc = null, DateTime createdAt = default, bool read = false, List<string> attachments = null, Guid? threadId = null, string messageId = null, string inReplyTo = null, Sender sender = null, EmailRecipients recipients = null, bool? favourite = null, List<string> bodyPartContentTypes = null, Guid? plusAddress = null, long? sizeBytes = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | ID of the email entity (required). |
| Guid? | inboxId | ID of the inbox that received the email. |
| Guid? | domainId | ID of the domain that received the email. |
| string | subject | The subject line of the email message as specified by SMTP subject header. |
| List<string> | to | List of |
| string | from | Who the email was sent from. An email address - see fromName for the sender name.. |
| List<string> | bcc | List of |
| List<string> | cc | List of |
| DateTime | createdAt | When was the email received by MailSlurp (required). |
| bool | read | 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. (required). |
| List<string> | attachments | 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.. |
| Guid? | threadId | MailSlurp thread ID for email chain that enables lookup for In-Reply-To and References fields.. |
| string | messageId | RFC 5322 Message-ID header value without angle brackets.. |
| string | inReplyTo | Parsed value of In-Reply-To header. A Message-ID in a thread.. |
| Sender | sender | sender. |
| EmailRecipients | recipients | recipients. |
| bool? | favourite | favourite. |
| List<string> | bodyPartContentTypes | bodyPartContentTypes. |
| Guid? | plusAddress | plusAddress. |
| long? | sizeBytes | sizeBytes. |
Properties
View SourceAttachments
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.
Declaration
[DataMember(Name = "attachments", EmitDefaultValue = true)]
public List<string> Attachments { get; set; }
Property Value
| Type | Description |
|---|---|
| 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. |
Bcc
List of BCC recipients email addresses that the email was addressed to. See recipients object for names.
Declaration
[DataMember(Name = "bcc", EmitDefaultValue = true)]
public List<string> Bcc { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of |
BodyPartContentTypes
Gets or Sets BodyPartContentTypes
Declaration
[DataMember(Name = "bodyPartContentTypes", EmitDefaultValue = true)]
public List<string> BodyPartContentTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> |
Cc
List of CC recipients email addresses that the email was addressed to. See recipients object for names.
Declaration
[DataMember(Name = "cc", EmitDefaultValue = true)]
public List<string> Cc { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of |
CreatedAt
When was the email received by MailSlurp
Declaration
[DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)]
public DateTime CreatedAt { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | When was the email received by MailSlurp |
DomainId
ID of the domain that received the email
Declaration
[DataMember(Name = "domainId", EmitDefaultValue = true)]
public Guid? DomainId { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? | ID of the domain that received the email |
Favourite
Gets or Sets Favourite
Declaration
[DataMember(Name = "favourite", EmitDefaultValue = true)]
public bool? Favourite { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
From
Who the email was sent from. An email address - see fromName for the sender name.
Declaration
[DataMember(Name = "from", EmitDefaultValue = true)]
public string From { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Who the email was sent from. An email address - see fromName for the sender name. |
Id
ID of the email entity
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | ID of the email entity |
InReplyTo
Parsed value of In-Reply-To header. A Message-ID in a thread.
Declaration
[DataMember(Name = "inReplyTo", EmitDefaultValue = true)]
public string InReplyTo { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Parsed value of In-Reply-To header. A Message-ID in a thread. |
InboxId
ID of the inbox that received the email
Declaration
[DataMember(Name = "inboxId", EmitDefaultValue = true)]
public Guid? InboxId { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? | ID of the inbox that received the email |
MessageId
RFC 5322 Message-ID header value without angle brackets.
Declaration
[DataMember(Name = "messageId", EmitDefaultValue = true)]
public string MessageId { get; set; }
Property Value
| Type | Description |
|---|---|
| string | RFC 5322 Message-ID header value without angle brackets. |
PlusAddress
Gets or Sets PlusAddress
Declaration
[DataMember(Name = "plusAddress", EmitDefaultValue = true)]
public Guid? PlusAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? |
Read
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.
Declaration
[DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)]
public bool Read { get; set; }
Property Value
| Type | Description |
|---|---|
| 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. |
Recipients
Gets or Sets Recipients
Declaration
[DataMember(Name = "recipients", EmitDefaultValue = true)]
public EmailRecipients Recipients { get; set; }
Property Value
| Type | Description |
|---|---|
| EmailRecipients |
Sender
Gets or Sets Sender
Declaration
[DataMember(Name = "sender", EmitDefaultValue = true)]
public Sender Sender { get; set; }
Property Value
| Type | Description |
|---|---|
| Sender |
SizeBytes
Gets or Sets SizeBytes
Declaration
[DataMember(Name = "sizeBytes", EmitDefaultValue = true)]
public long? SizeBytes { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
Subject
The subject line of the email message as specified by SMTP subject header
Declaration
[DataMember(Name = "subject", EmitDefaultValue = true)]
public string Subject { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The subject line of the email message as specified by SMTP subject header |
ThreadId
MailSlurp thread ID for email chain that enables lookup for In-Reply-To and References fields.
Declaration
[DataMember(Name = "threadId", EmitDefaultValue = true)]
public Guid? ThreadId { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? | MailSlurp thread ID for email chain that enables lookup for In-Reply-To and References fields. |
To
List of To recipient email addresses that the email was addressed to. See recipients object for names.
Declaration
[DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
public List<string> To { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of |
Methods
View SourceToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
| Type | Description |
|---|---|
| string | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | String presentation of the object |