Table of Contents

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

string

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

Maybe<MailAddress>

To

The recipient email address where the verification code will be sent.

[JsonPropertyOrder(1)]
[JsonConverter(typeof(EmailJsonConverter))]
public MailAddress To { get; }

Property Value

MailAddress

Methods

Parse(string)

Creates a new Email verification workflow with a default sender address.

public static Result<EmailWorkflow> Parse(string to)

Parameters

to string

The 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

to string

The recipient email address (e.g., "user@example.com").

from string

The 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

serializer IJsonSerializer

The JSON serializer to use.

Returns

string

The JSON representation of the workflow.