• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class MailProvider

A provider with the ability to send emails.

Inheritance
System.Object
MailProvider
CoreMailProvider
MailKitMailProvider
Namespace: DotNetNuke.Services.Mail
Assembly: DotNetNuke.dll
Syntax
public abstract class MailProvider : object

Properties

| Improve this Doc View Source

SupportsOAuth

Gets a value indicating whether this provider supports OAuth authentication to the SMTP server.

Declaration
public virtual bool SupportsOAuth { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Instance()

Gets the currently configured MailProvider instance.

Declaration
public static MailProvider Instance()
Returns
Type Description
MailProvider

A MailProvider instance.

| Improve this Doc View Source

SendMail(MailInfo, SmtpInfo)

Sends an email.

Declaration
public abstract string SendMail(MailInfo mailInfo, SmtpInfo smtpInfo = null)
Parameters
Type Name Description
MailInfo mailInfo

Information about the message to send.

SmtpInfo smtpInfo

Information about the SMTP server via which to send the message.

Returns
Type Description
System.String

if the message send successfully, otherwise an error message.

| Improve this Doc View Source

SendMailAsync(MailInfo, SmtpInfo, CancellationToken)

Sends an email.

Declaration
public virtual Task<string> SendMailAsync(MailInfo mailInfo, SmtpInfo smtpInfo = null, CancellationToken cancellationToken = null)
Parameters
Type Name Description
MailInfo mailInfo

Information about the message to send.

SmtpInfo smtpInfo

Information about the SMTP server via which to send the message.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<System.String>

if the message send successfully, otherwise an error message.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS