ajaynegi45 / LibraryMan-API

Revolutionize book management with LibraryMan! Easily track stock, borrowers, and due dates, streamlining operations for schools, companies, and libraries worldwide, ensuring efficient and organized book lending.
MIT License
44 stars 49 forks source link

[FEATURE] Implement Backend Functionality for Email Sending #87

Open shreya5653 opened 1 month ago

shreya5653 commented 1 month ago

Is this feature already requested?

Problem or Missing Functionality

The current system cannot send emails to subscribers, which blocks newsletters and notifications from reaching users. It also lacks unsubscribe options and proper email authentication. This feature will add email sending capabilities with reliable delivery and unsubscribe support.

Feature Description

This feature will enable the backend to send emails using an SMTP server (like Gmail or SendGrid) for newsletters and notifications. It will include authentication (SPF, DKIM, DMARC) to avoid spam issues and add unsubscribe options for users.

Screenshots

No response

Would you like to work on this feature?

Yes

Implementation Plan

The feature will be implemented by integrating an SMTP service to enable email sending. We will develop a service for composing and sending emails, add an unsubscribe option for users, and set up a retry mechanism for failed attempts. After testing the functionality, the feature will be deployed to the production environment, with ongoing monitoring for delivery reliability.

shreya5653 commented 1 month ago

@ajaynegi45 @Guhapriya01 I was studying the email-sending functionality, but I got delayed in raising the issue due to my exams. Now, I’d like to work on this issue. Please assign it to me.

ajaynegi45 commented 1 month ago

The feature will be implemented by integrating an SMTP service to ena

Hi @shreya5653, Thank you for expressing your interest in working on this issue. I'm delighted to inform you that I have assigned this issue to you. Your willingness to contribute to our project is much appreciated.

Use gmail to send emails. If I didn't reply within 24hr then ping me on LinkedIn.

Before making any contributions, please read the Readme.md file carefully to better understand the project's goals and purpose. This will give you clarity on our mission. Also, make sure to review the Contributing.md file, which contains important guidelines to make the contribution process smoother, especially for newcomers.

Feel free to start working, and if you have any questions or need assistance during the process, please don't hesitate to reach out.

shreya5653 commented 1 month ago

The feature will be implemented by integrating an SMTP service to ena

Hi @shreya5653, Thank you for expressing your interest in working on this issue. I'm delighted to inform you that I have assigned this issue to you. Your willingness to contribute to our project is much appreciated.

Use gmail to send emails. If I didn't reply within 24hr then ping me on LinkedIn.

Before making any contributions, please read the Readme.md file carefully to better understand the project's goals and purpose. This will give you clarity on our mission. Also, make sure to review the Contributing.md file, which contains important guidelines to make the contribution process smoother, especially for newcomers.

Feel free to start working, and if you have any questions or need assistance during the process, please don't hesitate to reach out.

Sure! Thank you so much

shreya5653 commented 4 weeks ago

@ajaynegi45 @Guhapriya01 I've been trying to run my project since yesterday, but I'm facing issues even after confirming that all dependency configurations are correct. After syncing the fork, I'm encountering errors in various files, such as missing beans in borrowing. Please advise if others are experiencing similar issues and what steps I can take to resolve this. I want to test my changes effectively.

ajaynegi45 commented 4 weeks ago

I think you haven't add required field in resources folder.

shreya5653 commented 4 weeks ago

I think you haven't add required field in resources folder.

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

shreya5653 commented 4 weeks ago

@ajaynegi45 While testing the recent changes, I temporarily disabled authentication for the relevant endpoints to ensure everything else was functioning correctly. This allowed me to validate that the logic was correct and that all expected flows were working as intended. I’ve attached the relevant screenshots in my PR for your reference.

ajaynegi45 commented 4 weeks ago

equired fields in the resources

https://www.linkedin.com/in/rishabh-singh-rawat-408762289/ He added the this feature. Ask your issue with him

@rishabhrawat05 can you resolve this issue

shreya5653 commented 4 weeks ago

equired fields in the resources

https://www.linkedin.com/in/rishabh-singh-rawat-408762289/ He added the this feature. Ask your issue with him

@rishabhrawat05 can you resolve this issue

@ajaynegi45 Thank you so much for your help so far. I will ask my issue to @rishabhrawat05. I temporarily bypassed the issue to test my changes, and everything is working correctly. It would be great if you could review my PR #89 so I can wrap this up and move on to a new issue.

rishabhrawat05 commented 3 weeks ago

@ajaynegi45 While testing the recent changes, I temporarily disabled authentication for the relevant endpoints to ensure everything else was functioning correctly. This allowed me to validate that the logic was correct and that all expected flows were working as intended. I’ve attached the relevant screenshots in my PR for your reference.

Hey! Can you please share some screenshots of the error you are receiving while starting the application and also share screenshot of your application.properties file and application.production file. I will try to fix the issue as fast as possible

Guhapriya01 commented 3 weeks ago

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

Hi @shreya5653,

I saw your message about the redirect issue after logging in. Just to clarify, are you experiencing the redirect problem with the OAuth login or the basic login? Knowing this will help us assist you better. Also, if you could share any relevant screenshots that @rishabhrawat05 requested, that would be really helpful.

shreya5653 commented 3 weeks ago

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

Hi @shreya5653,

I saw your message about the redirect issue after logging in. Just to clarify, are you experiencing the redirect problem with the OAuth login or the basic login? Knowing this will help us assist you better. Also, if you could share any relevant screenshots that @rishabhrawat05 requested, that would be really helpful

@Guhapriya01 @rishabhrawat05 I am experiencing the redirecting issue when I try to log in using 0Auth and bad credentials using basic login. Here are the screenshots

Screenshot (134) Screenshot (135) Screenshot (137)

rishabhrawat05 commented 3 weeks ago

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

Hi @shreya5653, I saw your message about the redirect issue after logging in. Just to clarify, are you experiencing the redirect problem with the OAuth login or the basic login? Knowing this will help us assist you better. Also, if you could share any relevant screenshots that @rishabhrawat05 requested, that would be really helpful

@Guhapriya01 @rishabhrawat05 I am experiencing the redirecting issue when I try to log in using 0Auth and bad credentials using basic login. Here are the screenshots

Screenshot (134) Screenshot (135) Screenshot (137)

Is there any error showing up in terminal and also can you use this jwt.secretKey=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTczMDEwNTk4MSwiaWF0IjoxNzMwMTA1OTg Instead of jwt.secretKey=shreya123

shreya5653 commented 3 weeks ago

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

Hi @shreya5653, I saw your message about the redirect issue after logging in. Just to clarify, are you experiencing the redirect problem with the OAuth login or the basic login? Knowing this will help us assist you better. Also, if you could share any relevant screenshots that @rishabhrawat05 requested, that would be really helpful

@Guhapriya01 @rishabhrawat05 I am experiencing the redirecting issue when I try to log in using 0Auth and bad credentials using basic login. Here are the screenshots Screenshot (134) Screenshot (135) Screenshot (137)

Is there any error showing up in terminal

No not error as such only logs

rishabhrawat05 commented 3 weeks ago

@ajaynegi45 I added all the required fields in the resources folder. After resolving all the errors and adding Oauth configurations after logging in with my email its redirecting to same login page. Can you please tell me why this is so? I checked my redirecting url as well.

Hi @shreya5653, I saw your message about the redirect issue after logging in. Just to clarify, are you experiencing the redirect problem with the OAuth login or the basic login? Knowing this will help us assist you better. Also, if you could share any relevant screenshots that @rishabhrawat05 requested, that would be really helpful

@Guhapriya01 @rishabhrawat05 I am experiencing the redirecting issue when I try to log in using 0Auth and bad credentials using basic login. Here are the screenshots Screenshot (134) Screenshot (135) Screenshot (137)

Is there any error showing up in terminal

No not error as such only logs

Ok try this jwt.secretKey=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTczMDEwNTk4MSwiaWF0IjoxNzMwMTA1OTg Instead of jwt.secretKey=shreya123

shreya5653 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger :


Request received for GET '/login':

org.apache.catalina.connector.RequestFacade@6f3b1af5

servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?A_Brand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94

Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ]


This is what I get

rishabhrawat05 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger :

Request received for GET '/login':

org.apache.catalina.connector.RequestFacade@6f3b1af5

servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94

Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ]

This is what I get

Did you test this on postman, Like registering and then login

shreya5653 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger : Request received for GET '/login': org.apache.catalina.connector.RequestFacade@6f3b1af5 servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94 Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ] This is what I get

Did you test this on postman, Like registering and then login

For testing any endpoints 401 unauthorized error . I tested my endpoints by temporarily disabling the authentication for those specific endpoints

rishabhrawat05 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger : Request received for GET '/login': org.apache.catalina.connector.RequestFacade@6f3b1af5 servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94 Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ] This is what I get

Did you test this on postman, Like registering and then login

For testing any endpoints 401 unauthorized error . I tested my endpoints by temporarily disabling the authentication for those specific endpoints

Register also showing 401 unauthorised??

shreya5653 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger : Request received for GET '/login': org.apache.catalina.connector.RequestFacade@6f3b1af5 servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94 Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ] This is what I get

Did you test this on postman, Like registering and then login

For testing any endpoints 401 unauthorized error . I tested my endpoints by temporarily disabling the authentication for those specific endpoints

Register also showing 401 unauthorised??

Yes

rishabhrawat05 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger : Request received for GET '/login': org.apache.catalina.connector.RequestFacade@6f3b1af5 servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94 Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ] This is what I get

Did you test this on postman, Like registering and then login

For testing any endpoints 401 unauthorized error . I tested my endpoints by temporarily disabling the authentication for those specific endpoints

Register also showing 401 unauthorised??

Yes

Okay, I will review the code and error and then get back to you as fast as possible

shreya5653 commented 3 weeks ago

@rishabhrawat05 Still the same issue . In the terminal : 2024-10-29T13:27:50.796+05:30 INFO 18204 --- [libraryman-api] [nio-8080-exec-7] Spring Security Debugger : Request received for GET '/login': org.apache.catalina.connector.RequestFacade@6f3b1af5 servletPath:/login pathInfo:null headers: host: localhost:8080 connection: keep-alive sec-ch-ua-platform: "Windows" user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0 sec-ch-ua: "Chromium";v="130", "Microsoft Edge";v="130", "Not?ABrand";v="99" sec-ch-ua-mobile: ?0 accept: image/avif,image/webp,image/apng,image/svg+xml,image/,_/*;q=0.8 sec-fetch-site: same-origin sec-fetch-mode: no-cors sec-fetch-dest: image referer: http://localhost:8080/login?error accept-encoding: gzip, deflate, br, zstd accept-language: en-US,en;q=0.9,en-IN;q=0.8 cookie: JSESSIONID=4E256A68568F153EE977230001DEBE94 Security filter chain: [ DisableEncodeUrlFilter WebAsyncManagerIntegrationFilter SecurityContextHolderFilter HeaderWriterFilter CorsFilter LogoutFilter OAuth2AuthorizationRequestRedirectFilter OAuth2LoginAuthenticationFilter JwtAuthenticationFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter DefaultLogoutPageGeneratingFilter BasicAuthenticationFilter RequestCacheAwareFilter SecurityContextHolderAwareRequestFilter AnonymousAuthenticationFilter SessionManagementFilter ExceptionTranslationFilter AuthorizationFilter ] This is what I get

Did you test this on postman, Like registering and then login

For testing any endpoints 401 unauthorized error . I tested my endpoints by temporarily disabling the authentication for those specific endpoints

Register also showing 401 unauthorised??

Yes

Okay, I will review the code and error and then get back to you as fast as possible

Okay Thank you so much @rishabhrawat05 . But I request @Guhapriya01 @ajaynegi45 to review my PR or at least let me know is my PR #89 under review coz this won't cause any conflicts with existing code.

Guhapriya01 commented 3 weeks ago

@shreya5653, sure! We’ll review it and let you know soon if any changes are needed.

Regarding the error, since you’re receiving a 401 Unauthorized for all endpoints, it’s likely that the Bearer token isn’t being included correctly in the Authorization header, or it might be invalid. Please double-check to ensure that the token is included properly.

shreya5653 commented 3 weeks ago

@shreya5653, sure! We’ll review it and let you know soon if any changes are needed.

Regarding the error, since you’re receiving a 401 Unauthorized for all endpoints, it’s likely that the Bearer token isn’t being included correctly in the Authorization header, or it might be invalid. Please double-check to ensure that the token is included properly.

Okay I will check it. Thank you so much!

rishabhrawat05 commented 3 weeks ago

Hey! @shreya5653 The redirect problem can only be fixed while creating the front end, as we cannot redirect to a different API just by logging in. We need a token to access different endpoints. Also, I have reviewed your code thoroughly, and it needs some changes. Here are the changes
1) Don't create extra EmailService and mail config files. The email sender/email service is already present. Here's how you can use it image

2) While sending the email you have to pass notification as a parameter of email service, passing null will raise a proxy error. Here's how you can implement image

3) Keep application.properties file as it is only change ${ENV:dev} to ${ENV:production} and use jwt.secretKey=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTczMDEwNTk4MSwiaWF0IjoxNzMwMTA1OTg After that, your application.properties file should look like this image

4) In the notification package -> NotificationType add two new values SUBSCRIBED and UNSUBSCRIBED. Here's how it will look image

5) Also, Increase the length of NotificationType in Notifications class by applying length=20 or it will raise error

Hope these changes will help project improvement, If you have any other issues please reach out I will help as fast as possible.

shreya5653 commented 3 weeks ago

Hey! @shreya5653 The redirect problem can only be fixed while creating the front end, as we cannot redirect to a different API just by logging in. We need a token to access different endpoints. Also, I have reviewed your code thoroughly, and it needs some changes. Here are the changes

  1. Don't create extra EmailService and mail config files. The email sender/email service is already present. Here's how you can use it image
  2. While sending the email you have to pass notification as a parameter of email service, passing null will raise a proxy error. Here's how you can implement image
  3. Keep application.properties file as it is only change ${ENV:dev} to ${ENV:production} and use jwt.secretKey=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTczMDEwNTk4MSwiaWF0IjoxNzMwMTA1OTg After that, your application.properties file should look like this image
  4. In the notification package -> NotificationType add two new values SUBSCRIBED and UNSUBSCRIBED. Here's how it will look image
  5. Also, Increase the length of NotificationType in Notifications class by applying length=20 or it will raise error

Hope these changes will help project improvement, If you have any other issues please reach out I will help as fast as possible.

@rishabhrawat05 Thank you so much for your guidance! I really appreciate your help. While making the changes, I kept your suggestions in mind and did my best to implement them. I believe I’ve made some progress and achieved what we wanted, but I wasn’t able to follow your suggestions exactly as you mentioned, as some of them were a bit difficult for me to grasp.

rishabhrawat05 commented 3 weeks ago

Hey! @shreya5653 The redirect problem can only be fixed while creating the front end, as we cannot redirect to a different API just by logging in. We need a token to access different endpoints. Also, I have reviewed your code thoroughly, and it needs some changes. Here are the changes

  1. Don't create extra EmailService and mail config files. The email sender/email service is already present. Here's how you can use it image
  2. While sending the email you have to pass notification as a parameter of email service, passing null will raise a proxy error. Here's how you can implement image
  3. Keep application.properties file as it is only change ${ENV:dev} to ${ENV:production} and use jwt.secretKey=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTczMDEwNTk4MSwiaWF0IjoxNzMwMTA1OTg After that, your application.properties file should look like this image
  4. In the notification package -> NotificationType add two new values SUBSCRIBED and UNSUBSCRIBED. Here's how it will look image
  5. Also, Increase the length of NotificationType in Notifications class by applying length=20 or it will raise error

Hope these changes will help project improvement, If you have any other issues please reach out I will help as fast as possible.

@rishabhrawat05 Thank you so much for your guidance! I really appreciate your help. While making the changes, I kept your suggestions in mind and did my best to implement them. I believe I’ve made some progress and achieved what we wanted, but I wasn’t able to follow your suggestions exactly as you mentioned, as some of them were a bit difficult for me to grasp.

Happy to hear that ☺️