Skip to content

[FEAT]: Newsletter Unsubscription Feature Implementation #687

@odero-lavenda

Description

@odero-lavenda

Description

Implement a feature that enables users to unsubscribe from the newsletter.

Acceptance Criteria

  • User can navigate to the unsubscribe page from the email.
  • User can confirm unsubscription on the unsubscribe page.
  • User receives a confirmation email after successful unsubscription.

Purpose

This feature is needed to allow users to opt out of receiving newsletters if they no longer wish to receive them, ensuring compliance with email marketing regulations and improving user satisfaction.

Requirements

  • The unsubscribe link should be included in the footer of the newsletter email.
  • The unsubscribe page should have a confirmation button.
  • An email service should be used to send the confirmation email.

API Endpoints

1. Generate Unsubscribe Link

Endpoint: GET /api/newsletter/unsubscribe-link?email={user_email}
Description: Generates a unique unsubscribe link for the user.

2. Unsubscribe from Newsletter

Endpoint: POST /api/newsletter/unsubscribe
Request Body:

{
  "email": "[email protected]"
}

Response:

{
  "message": "You have successfully unsubscribed from the newsletter."
}

Expected Outcome

Users who choose to unsubscribe from the newsletter will be able to do so easily and receive a confirmation that their unsubscription was successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions