Skip to content

Commit

Permalink
Merge pull request #2552 from behnaz-deriv/nov
Browse files Browse the repository at this point in the history
behnaz/onboarding phase2
  • Loading branch information
behnaz-deriv authored Feb 12, 2025
2 parents f924804 + 1fd9711 commit 85a0199
Show file tree
Hide file tree
Showing 46 changed files with 24,744 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const http = require('http');
const nodemailer = require('nodemailer');
require('dotenv').config({ path: '../.env' }); // Load from the .env file in automation directory

// Create mail transporter
// Create mail transporter using NODE_MAILER_TOKEN from GitHub secrets
const mail = nodemailer.createTransport({
service: 'gmail',
auth: {
user: 'behnaz1rahgozar1@gmail.com',
pass: process.env.NODE_MAILER_TOKEN // This will now load from your existing .env file
user: 'email address',
pass: process.env.NODE_MAILER_TOKEN // Using the secret from GitHub
}
});

Expand Down Expand Up @@ -48,7 +47,7 @@ const server = http.createServer((req, res) => {
if (error) {
console.error('Error sending email:', error);
res.writeHead(500);
res.end(JSON.stringify({ error: 'Failed to send email' }));
res.end(JSON.stringify({ error: 'Failed to send email: ' + error.message }));
} else {
console.log('Email sent:', info.response);
res.writeHead(200);
Expand All @@ -58,7 +57,7 @@ const server = http.createServer((req, res) => {
} catch (error) {
console.error('Error parsing request:', error);
res.writeHead(400);
res.end(JSON.stringify({ error: 'Invalid request format' }));
res.end(JSON.stringify({ error: 'Invalid request format: ' + error.message }));
}
});
} else {
Expand All @@ -71,5 +70,9 @@ const server = http.createServer((req, res) => {
const port = process.env.PORT || 3000;
server.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
console.log('Using NODE_MAILER_TOKEN from .env file');
if (process.env.NODE_MAILER_TOKEN) {
console.log('NODE_MAILER_TOKEN is configured');
} else {
console.log('Warning: NODE_MAILER_TOKEN is not set');
}
});
588 changes: 588 additions & 0 deletions public/email/templates/2025/partner/onboarding-1-ar.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions public/email/templates/2025/partner/onboarding-1-es.html

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions public/email/templates/2025/partner/onboarding-1-fr.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions public/email/templates/2025/partner/onboarding-1-pt.html

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions public/email/templates/2025/partner/onboarding-1.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions public/email/templates/2025/partner/onboarding-2-ar.html

Large diffs are not rendered by default.

587 changes: 587 additions & 0 deletions public/email/templates/2025/partner/onboarding-2-es.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions public/email/templates/2025/partner/onboarding-2-fr.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions public/email/templates/2025/partner/onboarding-2-pt.html

Large diffs are not rendered by default.

586 changes: 586 additions & 0 deletions public/email/templates/2025/partner/onboarding-2.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-3-ar.html

Large diffs are not rendered by default.

593 changes: 593 additions & 0 deletions public/email/templates/2025/partner/onboarding-3-es.html

Large diffs are not rendered by default.

593 changes: 593 additions & 0 deletions public/email/templates/2025/partner/onboarding-3-fr.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-3-pt.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-3.html

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions public/email/templates/2025/partner/onboarding-4-ar.html

Large diffs are not rendered by default.

523 changes: 523 additions & 0 deletions public/email/templates/2025/partner/onboarding-4-es.html

Large diffs are not rendered by default.

524 changes: 524 additions & 0 deletions public/email/templates/2025/partner/onboarding-4-fr.html

Large diffs are not rendered by default.

523 changes: 523 additions & 0 deletions public/email/templates/2025/partner/onboarding-4-pt.html

Large diffs are not rendered by default.

522 changes: 522 additions & 0 deletions public/email/templates/2025/partner/onboarding-4.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-5-ar.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-5-es.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-5-fr.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-5-pt.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-5.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-6-ar.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-6-es.html

Large diffs are not rendered by default.

592 changes: 592 additions & 0 deletions public/email/templates/2025/partner/onboarding-6-fr.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-6-pt.html

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions public/email/templates/2025/partner/onboarding-6.html

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions public/email/templates/2025/partner/onboarding-7-ar.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions public/email/templates/2025/partner/onboarding-7-es.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions public/email/templates/2025/partner/onboarding-7-fr.html

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions public/email/templates/2025/partner/onboarding-7-pt.html

Large diffs are not rendered by default.

509 changes: 509 additions & 0 deletions public/email/templates/2025/partner/onboarding-7.html

Large diffs are not rendered by default.

504 changes: 504 additions & 0 deletions public/email/templates/2025/partner/onboarding-8-ar.html

Large diffs are not rendered by default.

506 changes: 506 additions & 0 deletions public/email/templates/2025/partner/onboarding-8-es.html

Large diffs are not rendered by default.

506 changes: 506 additions & 0 deletions public/email/templates/2025/partner/onboarding-8-fr.html

Large diffs are not rendered by default.

506 changes: 506 additions & 0 deletions public/email/templates/2025/partner/onboarding-8-pt.html

Large diffs are not rendered by default.

505 changes: 505 additions & 0 deletions public/email/templates/2025/partner/onboarding-8.html

Large diffs are not rendered by default.

518 changes: 518 additions & 0 deletions public/email/templates/2025/partner/onboarding-9-ar.html

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions public/email/templates/2025/partner/onboarding-9-es.html

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions public/email/templates/2025/partner/onboarding-9-fr.html

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions public/email/templates/2025/partner/onboarding-9-pt.html

Large diffs are not rendered by default.

519 changes: 519 additions & 0 deletions public/email/templates/2025/partner/onboarding-9.html

Large diffs are not rendered by default.

0 comments on commit 85a0199

Please sign in to comment.