Enhanced file uploading for production (thanks citrinitas3421!)
This commit is contained in:
@@ -15,7 +15,7 @@ const transporter = nodemailer.createTransport({
|
||||
},
|
||||
})
|
||||
|
||||
export async function sendEmail({ to, subject, text, html }: Options) {
|
||||
export const sendEmail = async ({ to, subject, text, html }: Options) => {
|
||||
return await transporter.sendMail({
|
||||
from: `"${process.env.NAME} (noreply)" <${process.env.GMAIL}>`,
|
||||
to: Array.isArray(to) ? to : [to],
|
||||
@@ -25,7 +25,7 @@ export async function sendEmail({ to, subject, text, html }: Options) {
|
||||
})
|
||||
}
|
||||
|
||||
export function censorEmail(email: string): string {
|
||||
export const censorEmail = (email: string): string => {
|
||||
const [localPart, domain] = email.split('@')
|
||||
|
||||
if (localPart.length <= 2) return `${localPart}@${domain}`
|
||||
|
||||
Reference in New Issue
Block a user