Skip to main content

MailerService

@webda/core • Readme | API


Interface: MailerService

Represent a mailer service

Extends​

Methods​

handleNotificationFor()​

handleNotificationFor(userOrIdent): Promise<boolean>

Check if the service can deliver notification to this user

Parameters​

• userOrIdent: User | Ident

Returns​

Promise<boolean>

Inherited from​

NotificationService.handleNotificationFor

Source​

packages/core/src/services/notificationservice.ts:18


hasNotification()​

hasNotification(notification): Promise<boolean>

Check if this type of notification is available

Parameters​

• notification: string

Returns​

Promise<boolean>

Inherited from​

NotificationService.hasNotification

Source​

packages/core/src/services/notificationservice.ts:13


send()​

send(options, callback): Promise<any>

Parameters​

• options: MailerSendOptions

• callback: () => void

Returns​

Promise<any>

Params​

options Options to pass to the sendMail option of the nodemailer module

Params​

callback to pass to the sendMail

Source​

packages/core/src/services/mailer.ts:26


sendNotification()​

sendNotification(user, notification, replacements): Promise<void>

Send the notification to the user

Parameters​

• user: User | Ident

• notification: string

• replacements: any

Returns​

Promise<void>

Inherited from​

NotificationService.sendNotification

Source​

packages/core/src/services/notificationservice.ts:25