Struct EmailWorkflow
- Namespace
- Vonage.VerifyV2.StartVerification.Email
- Assembly
- Vonage.dll
Represents a verification workflow that delivers the PIN code via email.
public readonly struct EmailWorkflow : IVerificationWorkflow
- Implements
- Inherited Members
Properties
Channel
The verification channel identifier (e.g., "sms", "voice", "email", "whatsapp", "whatsapp_interactive", "silent_auth").
[JsonPropertyOrder(0)]
public string Channel { get; }
Property Value
From
The sender email address. If not specified, a default Vonage sender address is used.
[JsonConverter(typeof(MaybeJsonConverter<MailAddress>))]
[JsonPropertyOrder(3)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<MailAddress> From { get; }
Property Value
To
The recipient email address where the verification code will be sent.
[JsonPropertyOrder(1)]
[JsonConverter(typeof(EmailJsonConverter))]
public MailAddress To { get; }
Property Value
Methods
Parse(string)
Creates a new Email verification workflow with a default sender address.
public static Result<EmailWorkflow> Parse(string to)
Parameters
tostringThe recipient email address (e.g., "user@example.com").
Returns
- Result<EmailWorkflow>
A Result<T> containing the workflow if successful, or validation errors if the email is invalid.
Examples
var workflow = EmailWorkflow.Parse("user@example.com");
- See Also
Parse(string, string)
Creates a new Email verification workflow with a custom sender address.
public static Result<EmailWorkflow> Parse(string to, string from)
Parameters
tostringThe recipient email address (e.g., "user@example.com").
fromstringThe sender email address (e.g., "noreply@yourcompany.com").
Returns
- Result<EmailWorkflow>
A Result<T> containing the workflow if successful, or validation errors if any email is invalid.
Examples
var workflow = EmailWorkflow.Parse("user@example.com", "noreply@yourcompany.com");
- See Also
Serialize(IJsonSerializer)
Serializes the workflow configuration to JSON format for the API request.
public string Serialize(IJsonSerializer serializer)
Parameters
serializerIJsonSerializerThe JSON serializer to use.
Returns
- string
The JSON representation of the workflow.