Table of Contents

Class MailInfo

Namespace
Quartz.Jobs
Assembly
Quartz.Jobs.dll

The message SendMailJob built, and the SMTP server it is to be sent through.

public sealed class MailInfo
Inheritance
MailInfo
Inherited Members

Remarks

Handed to Send(MailInfo, CancellationToken), which is the seam for routing mail through something other than SmtpClient. A message and a host are always present; the rest of the SMTP settings are optional, and absent means "whatever the client defaults to".

Properties

Credentials

What to authenticate to the SMTP server with, or null to send unauthenticated.

public ICredentialsByHost? Credentials { get; init; }

Property Value

ICredentialsByHost

Remarks

The registered credential's answer for SmtpHost — a CredentialCache answers null for a host it was not bound to — or, for a job scheduled before there was a registered one, the smtp_username and smtp_password job data entries as a NetworkCredential.

EnableSsl

Whether to negotiate TLS with the SMTP server. false by default, which is SmtpClient's own default.

public bool EnableSsl { get; init; }

Property Value

bool

MailMessage

The message to send.

public required MailMessage MailMessage { get; init; }

Property Value

MailMessage

SmtpHost

The host name of the SMTP server to send through.

public required string SmtpHost { get; init; }

Property Value

string

SmtpPort

The port to reach the SMTP server on, or null for the client's default.

public int? SmtpPort { get; init; }

Property Value

int?