Skip to content

Feature/email system integration 44#60

Open
14mT wants to merge 7 commits into
mainfrom
feature/email-system-integration-44
Open

Feature/email system integration 44#60
14mT wants to merge 7 commits into
mainfrom
feature/email-system-integration-44

Conversation

@14mT

@14mT 14mT commented May 13, 2026

Copy link
Copy Markdown
Contributor

Issues

Closes #

Description

Email System Integration #44

Created an email system with Resend with a field of: the recipient, subject of the email, and its content. The API key have been stored securely (in .env at the moment) and not hardcoded anywhere. The system can be reused for different features (as demonstrated with the welcome function).

Some testing proof:
image
(earliest testing success - email was able to be sent)

Screenshot 2026-05-14 021547 (successful email sent to an actual email at the creation of a new user account - _without_ using the welcome email function) image (successful email sent to an actual email at the creation of a new user account - _with_ using the welcome email function)

Checklist:

  • An email adapter / provider has been configured through Payload (v)
  • Email recipient, subject, and content can be configured dynamically (v)
  • Failed email attempts are handled safely (?)
  • Sensitive configuration values (i.e. API keys) are stored securely and not hardcoded (v)
  • Email functionality is reusable for future features (v)
  • Test emails can be sent through the system (v)
  • Tested (independently of frontend integration) and shows expected results (v)

NOTES:

  • I changed the user.ts to become user.tsx after an error was raised as I was about to test the welcome email function, caused by using react email in said function.
  • The API key that I used was a personal one that I created myself (in the .env file).

Checklist

  • [v] Make sure you are requesting to pull a feature/fix branch (right side). Don't request the main branch!
  • [v] Make sure you are making a pull request against the main branch (left side). Also you should start your branch off main branch.
  • [v] I have added tests that prove my fix is effective or that my feature works.
  • [v] I have added the necessary documentation (if appropriate).

How To Review

payload.config.ts
send_email.ts
welcome.tsx
user.tsx

Notes

14mT added 4 commits May 14, 2026 00:09
Used Resend, react email.

Have been tested but this error still pops up: "Email attempted without being configured."
Email system have been tested and an actual email has been sent to an actual email.
*Forgot to mention in the previous commit:
- Created a ---RESEND_API_KEY=re_HKa1RAzZ_5eJmc8TUkBxEFaFb2AgGhhAd --- for the purpose of testing.

Tested an example welcome email (when new users are created), and it works as expected. Though the email is still use Resend's default sender email address.
Next: Use the previously made welcome.tsx to do this.

An email adapter / provider has been configured through Payload

Checklist:
- Email recipient, subject, and content can be configured dynamically (v)
- Failed email attempts are handled safely (?)
- Sensitive configuration values (i.e. API keys) are stored securely and not hardcoded (v)
- Email functionality is reusable for future features (v)
- Test emails can be sent through the system (v)
- Tested (independently of frontend integration) and shows expected results (v)
MAJOR CHANGE IN USER.TS:
- I changed the user.ts into user.tsx so that it can support the welcome email function (as it uses react email).
- also in payload.config.ts

Minor changes regarding the email system integration ticket:
- Tried out the welcome function from lib/email/email_templates/welcome.tsx , and it works as expected.
@dha524 dha524 linked an issue May 14, 2026 that may be closed by this pull request
7 tasks
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.

Email System Integration

2 participants