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.
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "EmailPreview")]
public class EmailPreview : IEquatable<EmailPreview>, IValidatableObject
Constructors
View SourceEmailPreview()
Initializes a new instance of the EmailPreview class.
Declaration
[JsonConstructor]
protected EmailPreview()
EmailPreview(Guid, Guid?, string, List<string>, string, List<string>, List<string>, DateTime, bool, List<string>)
Initializes a new instance of the EmailPreview class.
Declaration
public EmailPreview(Guid id = default, 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)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the email entity (required). |
System.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. |
System.Collections.Generic.List<T><string> | to | List of |
string | from | Who the email was sent from. An email address - see fromName for the sender name.. |
System.Collections.Generic.List<T><string> | bcc | List of |
System.Collections.Generic.List<T><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). |
System.Collections.Generic.List<T><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.. |
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 |
---|---|
System.Collections.Generic.List<T><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 |
---|---|
System.Collections.Generic.List<T><string> | List of |
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 |
---|---|
System.Collections.Generic.List<T><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 |
---|---|
System.Guid? | ID of the domain that received the email |
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 |
---|---|
System.Guid | ID of the email entity |
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. |
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 |
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 |
---|---|
System.Collections.Generic.List<T><string> | List of |
Methods
View SourceEquals(EmailPreview)
Returns true if EmailPreview instances are equal
Declaration
public bool Equals(EmailPreview input)
Parameters
Type | Name | Description |
---|---|---|
EmailPreview | input | Instance of EmailPreview to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Equals(object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
object | input | Object to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Overrides
View SourceGetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Hash code |
Overrides
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 |
Overrides
Validate(ValidationContext)
To validate all properties of the instance
Declaration
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
IEnumerable<ValidationResult> | Validation Result |