Skip to content

Commit

Permalink
Hot fix/update url for mkt email (#115)
Browse files Browse the repository at this point in the history
* updated URL

* updated env name

* added alert after sending email
  • Loading branch information
mai-vu authored May 29, 2024
1 parent b147828 commit dacf4c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cron/sendEmail.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const sendEmail = async recipient => {
<li><strong>Payment Plans:</strong> Choose from flexible payment plans that suit your budget and hiring needs.</li>
</ul>
<p>Ready to take your hiring to the next level? Sign up now via the link below and start reaching the talent you've been looking for!</p>
<p><a href=${process.env.NEXT_PUBLIC_JOB_BANK_API_URL} style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Sign Up Now</a></p>
<p><a href=${process.env.JOB_BANK_API_URL} style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Sign Up Now</a></p>
<p>Don't miss out on the opportunity to find your next great hire effortlessly. Join us today and experience the power of our job panel!</p>
<p>Best regards,</p>
<p>The [Job Panel] Team</p>`,
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/emailHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const sendEmail = async recipient => {
<li><strong>Payment Plans:</strong> Choose from flexible payment plans that suit your budget and hiring needs.</li>
</ul>
<p>Ready to take your hiring to the next level? Sign up now via the link below and start reaching the talent you've been looking for!</p>
<p><a href=${process.env.NEXT_PUBLIC_JOB_BANK_API_URL} style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Sign Up Now</a></p>
<p><a href=${process.env.JOB_BANK_API_URL} style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Sign Up Now</a></p>
<p>Don't miss out on the opportunity to find your next great hire effortlessly. Join us today and experience the power of our job panel!</p>
<p>Best regards,</p>
<p>The [Job Panel] Team</p>`,
Expand Down
2 changes: 2 additions & 0 deletions src/app/admin/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export default function Home() {
console.error('Error sending email:', error);
}

alert('Email sent to ' + recipient);

setEmails(prevEmails =>
prevEmails.map(emailObj =>
emailObj.email === recipient ? { ...emailObj, sent: true } : emailObj
Expand Down

0 comments on commit dacf4c5

Please sign in to comment.