Search Results for

    Show / Hide Table of Contents

    Class WebhookNewEmailPayload

    NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments.

    Inheritance
    object
    WebhookNewEmailPayload
    Implements
    IEquatable<WebhookNewEmailPayload>
    System.ComponentModel.DataAnnotations.IValidatableObject
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "WebhookNewEmailPayload")]
    public class WebhookNewEmailPayload : IEquatable<WebhookNewEmailPayload>, IValidatableObject

    Constructors

    View Source

    WebhookNewEmailPayload()

    Initializes a new instance of the WebhookNewEmailPayload class.

    Declaration
    [JsonConstructor]
    protected WebhookNewEmailPayload()
    View Source

    WebhookNewEmailPayload(string, Guid, EventNameEnum, string, Guid, Guid?, Guid, DateTime, List<string>, string, List<string>, List<string>, string, List<AttachmentMetaData>)

    Initializes a new instance of the WebhookNewEmailPayload class.

    Declaration
    public WebhookNewEmailPayload(string messageId = null, Guid webhookId = default, WebhookNewEmailPayload.EventNameEnum eventName = (WebhookNewEmailPayload.EventNameEnum)0, string webhookName = null, Guid inboxId = default, Guid? domainId = null, Guid emailId = default, DateTime createdAt = default, List<string> to = null, string from = null, List<string> cc = null, List<string> bcc = null, string subject = null, List<AttachmentMetaData> attachmentMetaDatas = null)
    Parameters
    Type Name Description
    string messageId

    Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).

    System.Guid webhookId

    ID of webhook entity being triggered (required).

    WebhookNewEmailPayload.EventNameEnum eventName

    Name of the event type webhook is being triggered for. (required).

    string webhookName

    Name of the webhook being triggered.

    System.Guid inboxId

    Id of the inbox (required).

    System.Guid? domainId

    Id of the domain that received an email.

    System.Guid emailId

    ID of the email that was received. Use this ID for fetching the email with the EmailController. (required).

    DateTime createdAt

    Date time of event creation (required).

    System.Collections.Generic.List<T><string> to

    List of To recipient email addresses that the email was addressed to. See recipients object for names. (required).

    string from

    Who the email was sent from. An email address - see fromName for the sender name. (required).

    System.Collections.Generic.List<T><string> cc

    List of CC recipients email addresses that the email was addressed to. See recipients object for names. (required).

    System.Collections.Generic.List<T><string> bcc

    List of BCC recipients email addresses that the email was addressed to. See recipients object for names. (required).

    string subject

    The subject line of the email message as specified by SMTP subject header.

    System.Collections.Generic.List<T><AttachmentMetaData> attachmentMetaDatas

    List of attachment meta data objects if attachments present (required).

    Properties

    View Source

    AttachmentMetaDatas

    List of attachment meta data objects if attachments present

    Declaration
    [DataMember(Name = "attachmentMetaDatas", IsRequired = true, EmitDefaultValue = true)]
    public List<AttachmentMetaData> AttachmentMetaDatas { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><AttachmentMetaData>

    List of attachment meta data objects if attachments present

    View Source

    Bcc

    List of BCC recipients email addresses that the email was addressed to. See recipients object for names.

    Declaration
    [DataMember(Name = "bcc", IsRequired = true, EmitDefaultValue = true)]
    public List<string> Bcc { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><string>

    List of BCC recipients email addresses that the email was addressed to. See recipients object for names.

    View Source

    Cc

    List of CC recipients email addresses that the email was addressed to. See recipients object for names.

    Declaration
    [DataMember(Name = "cc", IsRequired = true, EmitDefaultValue = true)]
    public List<string> Cc { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><string>

    List of CC recipients email addresses that the email was addressed to. See recipients object for names.

    View Source

    CreatedAt

    Date time of event creation

    Declaration
    [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)]
    public DateTime CreatedAt { get; set; }
    Property Value
    Type Description
    DateTime

    Date time of event creation

    View Source

    DomainId

    Id of the domain that received an email

    Declaration
    [DataMember(Name = "domainId", EmitDefaultValue = true)]
    public Guid? DomainId { get; set; }
    Property Value
    Type Description
    System.Guid?

    Id of the domain that received an email

    View Source

    EmailId

    ID of the email that was received. Use this ID for fetching the email with the EmailController.

    Declaration
    [DataMember(Name = "emailId", IsRequired = true, EmitDefaultValue = true)]
    public Guid EmailId { get; set; }
    Property Value
    Type Description
    System.Guid

    ID of the email that was received. Use this ID for fetching the email with the EmailController.

    View Source

    EventName

    Name of the event type webhook is being triggered for.

    Declaration
    [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
    public WebhookNewEmailPayload.EventNameEnum EventName { get; set; }
    Property Value
    Type Description
    WebhookNewEmailPayload.EventNameEnum

    Name of the event type webhook is being triggered for.

    View Source

    From

    Who the email was sent from. An email address - see fromName for the sender name.

    Declaration
    [DataMember(Name = "from", IsRequired = true, 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.

    View Source

    InboxId

    Id of the inbox

    Declaration
    [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)]
    public Guid InboxId { get; set; }
    Property Value
    Type Description
    System.Guid

    Id of the inbox

    View Source

    MessageId

    Idempotent message ID. Store this ID locally or in a database to prevent message duplication.

    Declaration
    [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)]
    public string MessageId { get; set; }
    Property Value
    Type Description
    string

    Idempotent message ID. Store this ID locally or in a database to prevent message duplication.

    View Source

    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

    View Source

    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 To recipient email addresses that the email was addressed to. See recipients object for names.

    View Source

    WebhookId

    ID of webhook entity being triggered

    Declaration
    [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)]
    public Guid WebhookId { get; set; }
    Property Value
    Type Description
    System.Guid

    ID of webhook entity being triggered

    View Source

    WebhookName

    Name of the webhook being triggered

    Declaration
    [DataMember(Name = "webhookName", EmitDefaultValue = true)]
    public string WebhookName { get; set; }
    Property Value
    Type Description
    string

    Name of the webhook being triggered

    Methods

    View Source

    Equals(WebhookNewEmailPayload)

    Returns true if WebhookNewEmailPayload instances are equal

    Declaration
    public bool Equals(WebhookNewEmailPayload input)
    Parameters
    Type Name Description
    WebhookNewEmailPayload input

    Instance of WebhookNewEmailPayload to be compared

    Returns
    Type Description
    bool

    Boolean

    View Source

    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
    Object.Equals(Object)
    View Source

    GetHashCode()

    Gets the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Hash code

    Overrides
    Object.GetHashCode()
    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()
    View Source

    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

    Implements

    System.IEquatable<T>
    System.ComponentModel.DataAnnotations.IValidatableObject
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.