Skip to content

SudoSOS Back-end API / notifications/channels/mail-channel / EmailChannel

Class: EmailChannel ​

A channel capable of delivering a notification (email, signal, SMS, etc.) using a specific template type, parameter type, and rendered output type.

Extends ​

Constructors ​

Constructor ​

ts
new EmailChannel(): EmailChannel;

Returns ​

EmailChannel

Inherited from ​

NotificationChannel.constructor

Properties ​

PropertyModifierTypeDefault valueOverrides
namereadonlyEMAILNotificationChannels.EMAILNotificationChannel.name
templatesreadonlyobjectundefinedNotificationChannel.templates
templates.ChangedPinpublicEmailTemplate<ChangedPinOptions>ChangedPinTemplate-
templates.ForgotEventPlanningpublicEmailTemplate<ForgotEventPlanningOptions>ForgotEventPlanningTemplate-
templates.HelloWorldpublicEmailTemplate<HelloWorldOptions>HelloWorldTemplate-
templates.InactiveAdministrativeCostNotificationpublicEmailTemplate<InactiveAdministrativeCostNotificationOptions>InactiveAdministrativeCostNotificationTemplate-
templates.MembershipExpiryNotificationpublicEmailTemplate<MembershipExpiryNotificationOptions>MembershipExpiryNotificationTemplate-
templates.PasswordResetpublicEmailTemplate<WelcomeWithResetOptions>PasswordResetTemplate-
templates.TransactionNotificationChargedByOtherpublicEmailTemplate<TransactionNotificationOptions>TransactionNotificationTemplate-
templates.TransactionNotificationSelfpublicEmailTemplate<TransactionNotificationOptions>TransactionNotificationTemplate-
templates.UserDebtNotificationpublicEmailTemplate<UserDebtNotificationOptions>UserDebtNotificationTemplate-
templates.UserGotFinedpublicEmailTemplate<UserGotFinedOptions>UserGotFinedTemplate-
templates.UserGotInactiveAdministrativeCostpublicEmailTemplate<UserGotInactiveAdministrativeCostOptions>UserGotInactiveAdministrativeCostTemplate-
templates.UserTypeUpdatedpublicEmailTemplate<UserTypeUpdatedOptions>UserTypeUpdatedTemplate-
templates.UserTypeUpdatedWithResetpublicEmailTemplate<UserTypeUpdatedWithResetOptions>UserTypeUpdatedWithResetTemplate-
templates.UserWillGetFinedpublicEmailTemplate<UserWillGetFinedOptions>UserWillGetFinedTemplate-
templates.WelcomeToSudosospublicEmailTemplate<WelcomeToSudososOptions>WelcomeToSudososTemplate-
templates.WelcomeWithResetpublicEmailTemplate<WelcomeWithResetOptions>WelcomeWithResetTemplate-

Methods ​

apply() ​

ts
apply(template, params): Promise<MailMessage<EmailTemplate<any>>>;

Parameters ​

ParameterType
templateEmailTemplate<any>
paramsTemplateOptions

Returns ​

Promise<MailMessage<EmailTemplate<any>>>

Overrides ​

NotificationChannel.apply


getTemplate() ​

ts
getTemplate(type): EmailTemplate<any>;

Parameters ​

ParameterType
typestring

Returns ​

EmailTemplate<any>

Inherited from ​

NotificationChannel.getTemplate


log() ​

ts
log(user, code): Promise<void>;

Parameters ​

ParameterType
userUser
codeNotificationTypes

Returns ​

Promise<void>

Inherited from ​

NotificationChannel.log


send() ​

ts
send(user, email): Promise<void>;

Parameters ​

ParameterType
userUser
emailMailMessage<EmailTemplate<any>>

Returns ​

Promise<void>

Overrides ​

NotificationChannel.send


supports() ​

ts
supports(type): boolean;

Parameters ​

ParameterType
typestring

Returns ​

boolean

Inherited from ​

NotificationChannel.supports