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: Implemented form for reporting issues encountered while accessing the course #1712

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ToseebNadaf
Copy link

PR Fixes:

  • This PR updates the contact form in the application to allow users to report issues.
  • The email sent now includes the user's name, email, and their issue description.
  • Updated the backend endpoint to handle issue reporting.
  • Enhanced the sendMail function to include full user details.
  • Added error handling for missing fields in the form.

Note:
--- Just create app password from manage google and add it to the env file

Resolves #1711

Checklist before requesting a review

  • [✅] I have performed a self-review of my code
  • [✅] I assure there is no similar/duplicate pull request regarding same issue

Before:

cursorful-video-1736890156227.mp4

After:

cursorful-video-1736892094746_2.mp4

@ToseebNadaf
Copy link
Author

@devsargam and @hkirat please look into this and suggest me any changes if needed

@@ -0,0 +1,31 @@
import nodemailer from "nodemailer";

const transporter = nodemailer.createTransport({
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, gmail limits the number of emails that we can send over a day. So, we might reach that limit very easily

Copy link
Author

Choose a reason for hiding this comment

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

Yes, but Gmail enforces daily email limits regardless of the method used (SMTP, web interface, or API). If we’re likely to hit these limits, then we have to switch to a scalable service like SendGrid for handling higher email volumes effectively.

import { NextResponse } from "next/server";
import { sendMail } from "@/lib/nodemailer";

export async function POST(req: Request) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing authentication check here

Copy link
Author

@ToseebNadaf ToseebNadaf Jan 15, 2025

Choose a reason for hiding this comment

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

Added now

@devsargam
Copy link
Collaborator

I will check with the team if this feature is needed or not and will update

@ToseebNadaf ToseebNadaf force-pushed the feature/contact-form-issue-report branch from 09cde3f to 3643626 Compare January 15, 2025 12:58
@ToseebNadaf ToseebNadaf requested a review from devsargam January 16, 2025 12:13
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.

feature: add a form to report issues while accessing courses
2 participants