mails

import mails "ganigeorgiev.com/pocketbase/pocketbase/mails"

Package mails implements various helper methods for sending common emails like forgotten password, verification, etc.

Source: mails.

Functions

SendRecordAuthAlert

func SendRecordAuthAlert(app core.App, authRecord *core.Record, info string) error

SendRecordAuthAlert sends a new device login alert to the specified auth record.

SendRecordChangeEmail

func SendRecordChangeEmail(app core.App, authRecord *core.Record, newEmail string) error

SendRecordChangeEmail sends a change email confirmation email to the specified auth record.

SendRecordOTP

func SendRecordOTP(app core.App, authRecord *core.Record, otpId string, pass string) error

SendRecordOTP sends OTP email to the specified auth record.

This method will also update the "sentTo" field of the related OTP record to the mail sent To address (if the OTP exists and not already assigned).

SendRecordPasswordReset

func SendRecordPasswordReset(app core.App, authRecord *core.Record) error

SendRecordPasswordReset sends a password reset request email to the specified auth record.

SendRecordVerification

func SendRecordVerification(app core.App, authRecord *core.Record) error

SendRecordVerification sends a verification request email to the specified auth record.