Skip to content

Commit

Permalink
fix(email): use user notification_email
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Feb 23, 2021
1 parent d38790e commit de4cd63
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,9 @@ exports.postApplication = async (req, res) => {

// We don't need to recalculate the votes amount, as the pax type is not set here.

const notificationEmail = await core.getMember(req, newApplication.user_id).notification_email;

// Sending the mail to a user.
await mailer.sendMail({
to: notificationEmail,
to: req.user.notification_email,
subject: `You've successfully applied for ${req.event.name}`,
template: 'statutory_applied.html',
parameters: {
Expand Down

0 comments on commit de4cd63

Please sign in to comment.