Skip to content

A Node.js application designed to handle feedback from users. It validates the relevancy of the feedback before forwarding the message to the specified receiver via email. Developers need not setup their own feedback infrastructure.

Notifications You must be signed in to change notification settings

yuvrajzanwar/Feedback-Mail-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feedback Mail Server

This project provides a publicly available mail server for user feedback handling. It uses Node.js and integrates with Google AI to check the relevancy of feedback messages before sending them to specified email addresses.

Part 1: Using the Service

Base URL

The service is hosted on Render. Use the following base URL to access the service:

Endpoints

POST /contact

Description: Sends feedback to specified receiver email addresses after checking the relevancy of the message.

Request Body:

{   
    "name":"testuser",
    "email": "user@example.com",
    "feedback": "This is a feedback message.",
    "context": "product feedback",
    "receiverEmail": "receiver@gmail.com"
}

Response:

  • Success (200): Message sent
  • Failure (400): Message is not relevant or Missing required fields: name, email, feedback, context, receiverEmail
  • Error (500): Error message

Part 2: Setting Up a Customized Server

Prerequisites

  • Obtaining Google AI API key.
  • Setting up a receiver Gmail account.
  • Getting app password for your Gmail account after 2FA.

Clone the repository

git clone https://github.com/yuvrajzanwar/feedback-mail-server.git
cd feedback-mail-server
npm install

Create a env file

EMAIL_USER=your-email@gmail.com
APP_PASS=your-app-password
GOOGLEAI_API_KEY=your-google-ai-api-key

Run the server

node server.js

Updates to be added :

Add database for storing and managing the feedback messages corresponding to each receiver mail.

Add other routes to view messages stored in the database alongwith their relevance status after authentication.

Contributing

Feel free to submit issues or pull requests to improve the project.

License

This project is licensed under the MIT License.

About

A Node.js application designed to handle feedback from users. It validates the relevancy of the feedback before forwarding the message to the specified receiver via email. Developers need not setup their own feedback infrastructure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published