Class OpenBiEmailExtensions
Extension methods for sending emails.
Inheritance
OpenBiEmailExtensions
Namespace: BiExcellence.OpenBi.Api.Commands.Configurator
Assembly: BiExcellence.OpenBi.Api.Configurator.dll
Syntax
public static class OpenBiEmailExtensions
Methods
SendEmailAsync(IOpenBiSession, string?, string, string, string, bool, CancellationToken)
Sends an email.
Declaration
public static Task SendEmailAsync(this IOpenBiSession session, string? from, string to, string subject, string body, bool isBodyHtml, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | from | The from email address. |
string | to | The to email address(es). |
string | subject | The email subject. |
string | body | The email body. |
bool | isBodyHtml | Whether the email body is HTML or not. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
Remarks
Requires a valid SMTP configuration on the server: SMTP_HOST, SMTP_PORT, SMTP_SSL, SMTP_USERNAME, SMTP_PASSWORD, SMTP_DOMAIN, SMTP_BIND_IP, SMTP_FROM
SendEmailAsync(IOpenBiSession, string?, string, string?, string?, string, string, bool, CancellationToken)
Sends an email.
Declaration
public static Task SendEmailAsync(this IOpenBiSession session, string? from, string to, string? cc, string? bcc, string subject, string body, bool isBodyHtml, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | from | The from email address. |
string | to | The to email address(es). |
string | cc | The cc email address(es). |
string | bcc | The bcc email address(es). |
string | subject | The email subject. |
string | body | The email body. |
bool | isBodyHtml | Whether the email body is HTML or not. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
Remarks
Requires a valid SMTP configuration on the server: SMTP_HOST, SMTP_PORT, SMTP_SSL, SMTP_USERNAME, SMTP_PASSWORD, SMTP_DOMAIN, SMTP_BIND_IP, SMTP_FROM