Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Send welcome email for new user #273

Merged
merged 5 commits into from
Nov 3, 2024
Merged

feat: Send welcome email for new user #273

merged 5 commits into from
Nov 3, 2024

Conversation

HugoRCD
Copy link
Owner

@HugoRCD HugoRCD commented Nov 3, 2024

Fixes #267

Add functionality to send a welcome email upon the creation of a new user's first OAuth account.

  • New Welcome Email Template: Create a new Vue email template in apps/shelve/server/emails/welcomeEmail.vue that includes a comprehensive guide with next steps, helpful resources, tips, and an overview of the platform's features.
  • Email Service Updates: Modify apps/shelve/server/services/resend.service.ts to include a method for sending the welcome email using the new template. Update the sendOtp method to use the new generateOtpTemplate method.
  • GitHub OAuth Route Updates: Modify apps/shelve/server/routes/auth/github.ts to import the EmailService and call the sendWelcomeEmail method after successfully creating a new user.

For more details, open the Copilot Workspace session.

Fixes #267

Add functionality to send a welcome email upon the creation of a new user's first OAuth account.

* **New Welcome Email Template**: Create a new Vue email template in `apps/shelve/server/emails/welcomeEmail.vue` that includes a comprehensive guide with next steps, helpful resources, tips, and an overview of the platform's features.
* **Email Service Updates**: Modify `apps/shelve/server/services/resend.service.ts` to include a method for sending the welcome email using the new template. Update the `sendOtp` method to use the new `generateOtpTemplate` method.
* **GitHub OAuth Route Updates**: Modify `apps/shelve/server/routes/auth/github.ts` to import the `EmailService` and call the `sendWelcomeEmail` method after successfully creating a new user.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/HugoRCD/shelve/issues/267?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shelve ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 3, 2024 8:53pm

Copy link

github-actions bot commented Nov 3, 2024

Thank you for following the naming conventions! 🙏

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Thank you for following the naming conventions! 🙏

@github-actions github-actions bot added the feature New feature or request label Nov 3, 2024
This commit introduces a new feature that allows admins to test the sending of welcome emails to new users. A new 'Tests' section has been added in the admin navigation for this purpose. The code also includes error handling for failed email sends.

In addition, changes have been made to the content of the welcome email sent to new users. The invitation to join our community has been removed from the message. Also, if a username is not available, the user's email will be used in the greeting instead.
@HugoRCD HugoRCD self-assigned this Nov 3, 2024
@HugoRCD HugoRCD marked this pull request as ready for review November 3, 2024 20:46
Moved the triggering of the welcome email from GitHub OAuth event handler to UserService. Now, the welcome email is sent when a new user is created in UserService instead of after successful GitHub authentication. This change ensures that all new users, regardless of their method of registration, receive a welcome email.
@HugoRCD HugoRCD merged commit 7d0e35c into main Nov 3, 2024
6 of 8 checks passed
@HugoRCD HugoRCD deleted the feat/267 branch November 3, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Send welcome email for new user
1 participant