đ Service Information
Service Name: Email Service
Port: 8055
Base URL: http://localhost:8055
Description: Handles email notifications via Kafka events. This is an event-driven service that consumes Kafka messages and sends emails.
Architecture: Kafka Consumer Service - No REST API endpoints
âšī¸ Important Note
This service does not expose REST API endpoints. It operates as a Kafka consumer, listening to events from other services and sending emails accordingly.
To send emails, other services should publish events to the configured Kafka topics.
User Registration Email
Consumes events when a new user is registered. Sends welcome email with login credentials.
Event Structure: Contains email request with template data for registration email
Generic Email Topic
Consumes generic email events. Can send any email template based on the event data.
Event Structure: Contains email request with template name and template data
Registration Email
Welcome email sent to new users with their login credentials (email and password).
Template Variables: fullName, email, password, loginUrl, websiteUrl, supportEmail, year
Welcome Email
Simple welcome email for new users.
Template Variables: fullName, loginUrl, websiteUrl, supportEmail, year
Password Reset Email
Email sent when user requests password reset with reset link.
Template Variables: fullName, resetLink, websiteUrl, supportEmail, year
Password Reset Confirmation
Confirmation email sent after password is successfully reset.
Template Variables: fullName, email, websiteUrl, supportEmail, year
Password Change Confirmation
Confirmation email sent when password is changed.
Template Variables: fullName, email, websiteUrl, supportEmail, year
Forgot Password OTP
Email sent with OTP code for password reset.
Template Variables: fullName, email, otp, websiteUrl, supportEmail, year
Resend Credentials
Email sent when credentials are resent to a user.
Template Variables: fullName, email, password, websiteUrl, supportEmail, year
SMTP Configuration
Host: smtp.gmail.com
Port: 587
Security: STARTTLS enabled
From Address: noreply@qms.appadvent.com
From Name: QMS System
Base URL: http://localhost:3000 (for email links)
Kafka Configuration
Bootstrap Servers: localhost:9092
Consumer Group: email-service-group
Auto Offset Reset: earliest
Publishing Email Events
To send an email, publish an event to one of the Kafka topics with the following structure: