Skip to content

[SSF-180, 189, 193] - Automated Emails Implementation#154

Open
swarkewalia wants to merge 14 commits intomainfrom
sk/SSF-180-automated-emails
Open

[SSF-180, 189, 193] - Automated Emails Implementation#154
swarkewalia wants to merge 14 commits intomainfrom
sk/SSF-180-automated-emails

Conversation

@swarkewalia
Copy link
Copy Markdown

@swarkewalia swarkewalia commented Apr 12, 2026

ℹ️ Issue

Closes #180, #189, and #193

📝 Description

Implemented email templates for:

  • FM Recurring Donation Reminder
  • Tracking link becomes available
  • Pantry Confirms Order Delivery
  • Volunteer pantry assignment changed
  • Frontend for resubmit previous donations

Also updated the recurring donation reminder to use this template on the cron job instead of logging. The template uses this new query parameter, resubmitDonationId which automatically opens up the modal for that id, with all the donation items from it filled in (if there is a match).

✔️ Verification

BEFORE TESTING: Add 2 new environment variables:

AWS_SES_SENDER_EMAIL (set this to one of your emails, this will be the address that sends the emails for you to verify)
SEND_AUTOMATED_EMAILS (switch this to true to turn on Cognito account creation and email sending permissions)
Add your email that you put in the AWS_SES_SENDER_EMAIL into the following AWS SES Identities: https://us-east-2.console.aws.amazon.com/ses/home?region=us-east-2#/identities

Tested each workflow to ensure the proper sender, subject, message, attachments were all there.

Same testing as #127

Frontend page:
image
image
image

🏕️ (Optional) Future Work / Notes

emails go to spam :(

Copy link
Copy Markdown

@Juwang110 Juwang110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sam-schu Should we be adding tests for the new email functionality like in #127

Comment thread apps/backend/src/emails/emailTemplates.ts Outdated
Comment thread apps/backend/src/emails/emailTemplates.ts
Comment thread apps/backend/src/emails/emailTemplates.ts
Comment thread apps/backend/src/orders/order.service.ts Outdated
Comment thread apps/backend/src/orders/order.service.ts Outdated
Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/orders/order.service.ts Outdated
Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on Justin's comment for adding tests!

Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/emails/emailTemplates.ts
Comment thread apps/backend/src/donations/donations.service.ts Outdated
Comment thread apps/backend/src/orders/order.service.ts Outdated
Comment thread apps/backend/src/orders/order.service.ts Outdated
Comment thread apps/backend/src/emails/emailTemplates.ts
@dburkhart07 dburkhart07 requested review from Juwang110 and sam-schu May 5, 2026 04:04
@dburkhart07 dburkhart07 changed the title [SSF-180] - Automated Emails 2 Implementation [SSF-180, 189, 193] - Automated Emails Implementation May 5, 2026
@dburkhart07 dburkhart07 self-assigned this May 5, 2026
message.bodyHTML,
);
} catch {
// email failed — still count as a recurrence and move on
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In these cases should we be logging something? @sam-schu thoughts?

schedule indicates a new donation submission is due.
</p>
<p>
When you have a moment, please log into your account and submit your current
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all these email templates can you add a link on "log into your account" for the login page? Sam asked me to do so on my PR #162

message.subject,
message.bodyHTML,
);
} catch (e) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we can just delete "(e)"

message.subject,
message.bodyHTML,
);
} catch (e) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete "(e)"

setSelectedDonationId(initialDonationId);
fetchItemsForDonation(initialDonationId);
}
}, [isOpen, initialDonationId]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add dependency

Dialog,
Flex,
Portal,
Spinner,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete Spinner

foodRescue: item.foodRescue,
})),
};
console.log(dto);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this log should be deleted i think

<ChevronDown size={20} />
</Flex>

{isDropdownOpen && (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when i open the dropdown it covers the submit button and overall the modal is very short, can we make it taller to accomodate both like in the design

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants