mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
18 lines
437 B
JavaScript
18 lines
437 B
JavaScript
import templates from "../templates"
|
|
|
|
export default async (ctx, data) => {
|
|
const { user, activation_code } = data
|
|
|
|
const result = await ctx.mailTransporter.sendMail({
|
|
from: process.env.SMTP_USERNAME,
|
|
to: user.email,
|
|
subject: "Account activation",
|
|
html: templates.account_activation({
|
|
username: user.username,
|
|
code: activation_code,
|
|
}),
|
|
})
|
|
|
|
return result
|
|
}
|