Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

add email information as env

mike.michelb0243af07af2
diff --git a/.env.example b/.env.example
index 7fbeb6e3e..9485cfa54 100644
--- a/.env.example
+++ b/.env.example
@@ -45,4 +45,6 @@ PINTEREST_CLIENT_ID=""
PINTEREST_CLIENT_SECRET=""
DRIBBBLE_CLIENT_ID=""
DRIBBBLE_CLIENT_SECRET=""
-IS_GENERAL="true"
\ No newline at end of file
+IS_GENERAL="true"
+EMAIL_FROM_ADDRESS=""
+EMAIL_FROM_NAME=""
\ No newline at end of file
diff --git a/libraries/nestjs-libraries/src/services/email.service.ts b/libraries/nestjs-libraries/src/services/email.service.ts
index a847ed93c..037a72fd9 100644
--- a/libraries/nestjs-libraries/src/services/email.service.ts
+++ b/libraries/nestjs-libraries/src/services/email.service.ts
@@ -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 <[email protected]>' : 'Nevo <[email protected]>',
+ from: `${process.env.EMAIL_FROM_NAME} <${process.env.EMAIL_FROM_ADDRESS}>`,
to,
subject,
html,