add email information as env
This commit is contained in:
parent
162ae71a5e
commit
b0243af07a
|
|
@ -45,4 +45,6 @@ PINTEREST_CLIENT_ID=""
|
|||
PINTEREST_CLIENT_SECRET=""
|
||||
DRIBBBLE_CLIENT_ID=""
|
||||
DRIBBBLE_CLIENT_SECRET=""
|
||||
IS_GENERAL="true"
|
||||
IS_GENERAL="true"
|
||||
EMAIL_FROM_ADDRESS=""
|
||||
EMAIL_FROM_NAME=""
|
||||
|
|
@ -11,9 +11,14 @@ export class EmailService {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!process.env.EMAIL_FROM_ADDRESS || !process.env.EMAIL_FROM_NAME) {
|
||||
console.log('Email sender information not found in environment variables');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Sending email to', to);
|
||||
const sends = await resend.emails.send({
|
||||
from: process.env.IS_GENERAL === 'true' ? 'Nevo <nevo@postiz.com>' : 'Nevo <nevo@postiz.com>',
|
||||
from: `${process.env.EMAIL_FROM_NAME} <${process.env.EMAIL_FROM_ADDRESS}>`,
|
||||
to,
|
||||
subject,
|
||||
html,
|
||||
|
|
|
|||
Loading…
Reference in New Issue