Search Results for

    Show / Hide Table of Contents

    Class UploadAttachmentOptions

    Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your SendEmailOptions when sending an email. This way you can use attachments multiple times once they have been uploaded.

    Inheritance
    object
    UploadAttachmentOptions
    Implements
    IValidatableObject
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "UploadAttachmentOptions")]
    public class UploadAttachmentOptions : IValidatableObject

    Constructors

    View Source

    UploadAttachmentOptions()

    Initializes a new instance of the UploadAttachmentOptions class.

    Declaration
    [JsonConstructor]
    protected UploadAttachmentOptions()
    View Source

    UploadAttachmentOptions(string, string, string, string)

    Initializes a new instance of the UploadAttachmentOptions class.

    Declaration
    public UploadAttachmentOptions(string contentId = null, string contentType = null, string filename = null, string base64Contents = null)
    Parameters
    Type Name Description
    string contentId

    Optional contentId for file..

    string contentType

    Optional contentType for file. For instance application/pdf.

    string filename

    Optional filename to save upload with. Will be the name that is shown in email clients.

    string base64Contents

    Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ (required).

    Properties

    View Source

    Base64Contents

    Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/

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

    Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/

    View Source

    ContentId

    Optional contentId for file.

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

    Optional contentId for file.

    View Source

    ContentType

    Optional contentType for file. For instance application/pdf

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

    Optional contentType for file. For instance application/pdf

    View Source

    Filename

    Optional filename to save upload with. Will be the name that is shown in email clients

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

    Optional filename to save upload with. Will be the name that is shown in email clients

    Methods

    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()

    Implements

    IValidatableObject
    • View Source
    In this article
    Back to top See MailSlurp website for more information.