Skip to main content

email

Documentation / lib/server/email

sendEmail()

function sendEmail(
email: string,
subject: string,
body: string,
authResendKey: string): Promise<boolean>;

Defined in: apps/web/src/lib/server/email.ts:58

Sends an email to the specified email address.

Parameters

ParameterTypeDescription

email

string

The email address to send the email to.

subject

string

The subject of the email.

body

string

The content of the email.

authResendKey

string

Returns

Promise<boolean>

A promise that resolves to a boolean indicating whether the email was sent successfully.

See

Resend Resend Docs


sendEmailVerificationEmail()

function sendEmailVerificationEmail(
email: string,
name: string,
token: string,
authResendKey: string): Promise<boolean>;

Defined in: apps/web/src/lib/server/email.ts:89

Sends a verification email to the specified email address.

Parameters

ParameterTypeDescription

email

string

The email address to send the verification email to.

name

string

The name of the user to include in the email.

token

string

The verification token to include in the email.

authResendKey

string

Returns

Promise<boolean>

A promise that resolves to a boolean indicating whether the email was sent successfully.


sendWelcomeEmail()

function sendWelcomeEmail(
email: string,
name: string,
authResendKey: string): Promise<boolean>;

Defined in: apps/web/src/lib/server/email.ts:106

Parameters

ParameterType

email

string

name

string

authResendKey

string

Returns

Promise<boolean>


sendPasswordResetEmail()

function sendPasswordResetEmail(
email: string,
token: string,
authResendKey: string): Promise<boolean>;

Defined in: apps/web/src/lib/server/email.ts:122

TODO insert welcome user in this email

Parameters

ParameterType

email

string

token

string

authResendKey

string

Returns

Promise<boolean>


sendEmailChangeEmail()

function sendEmailChangeEmail(
email: string,
name: string,
token: string,
authResendKey: string): Promise<boolean>;

Defined in: apps/web/src/lib/server/email.ts:137

Parameters

ParameterType

email

string

name

string

token

string

authResendKey

string

Returns

Promise<boolean>