Class MailProvider
A provider with the ability to send emails.
Namespace: DotNetNuke.Services.Mail
Assembly: DotNetNuke.dll
Syntax
public abstract class MailProvider : object
Properties
| Improve this Doc View SourceSupportsOAuth
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 SourceInstance()
Gets the currently configured MailProvider instance.
Declaration
public static MailProvider Instance()
Returns
Type | Description |
---|---|
MailProvider | A MailProvider instance. |
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 |
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> |