Class CreateAliasOptions
Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address.
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "CreateAliasOptions")]
public class CreateAliasOptions : IEquatable<CreateAliasOptions>, IValidatableObject
Constructors
View SourceCreateAliasOptions()
Initializes a new instance of the CreateAliasOptions class.
Declaration
[JsonConstructor]
protected CreateAliasOptions()
CreateAliasOptions(string, Guid?, string, bool, Guid?, bool?)
Initializes a new instance of the CreateAliasOptions class.
Declaration
public CreateAliasOptions(string emailAddress = null, Guid? inboxId = null, string name = null, bool useThreads = false, Guid? domainId = null, bool? verifyEmailAddress = null)
Parameters
Type | Name | Description |
---|---|---|
string | emailAddress | Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first. (required). |
System.Guid? | inboxId | Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address. |
string | name | Optional name for alias. |
bool | useThreads | Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. (required). |
System.Guid? | domainId | Custom domain ID to use when generating alias email addresses. |
bool? | verifyEmailAddress | Whether to verify the masked email address exists before sending an email to it. |
Properties
View SourceDomainId
Custom domain ID to use when generating alias email addresses
Declaration
[DataMember(Name = "domainId", EmitDefaultValue = true)]
public Guid? DomainId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid? | Custom domain ID to use when generating alias email addresses |
EmailAddress
Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first.
Declaration
[DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)]
public string EmailAddress { get; set; }
Property Value
Type | Description |
---|---|
string | Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first. |
InboxId
Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address
Declaration
[DataMember(Name = "inboxId", EmitDefaultValue = true)]
public Guid? InboxId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid? | Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address |
Name
Optional name for alias
Declaration
[DataMember(Name = "name", EmitDefaultValue = true)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | Optional name for alias |
UseThreads
Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved.
Declaration
[DataMember(Name = "useThreads", IsRequired = true, EmitDefaultValue = true)]
public bool UseThreads { get; set; }
Property Value
Type | Description |
---|---|
bool | Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. |
VerifyEmailAddress
Whether to verify the masked email address exists before sending an email to it
Declaration
[DataMember(Name = "verifyEmailAddress", EmitDefaultValue = true)]
public bool? VerifyEmailAddress { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether to verify the masked email address exists before sending an email to it |
Methods
View SourceEquals(CreateAliasOptions)
Returns true if CreateAliasOptions instances are equal
Declaration
public bool Equals(CreateAliasOptions input)
Parameters
Type | Name | Description |
---|---|---|
CreateAliasOptions | input | Instance of CreateAliasOptions 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 |