This implementation adds comprehensive email notification functionality to the ATS Checker application with a dark theme design that matches the application's UI.
- Welcome Email - Sent when users register
- Report Completion Email - Sent automatically when ATS analysis completes
- Dashboard Summary Email - Manual or scheduled weekly summaries
- Test Email - For testing email configuration
- Consistent with application's dark theme (#0A0A0A background)
- Modern gradient designs
- Professional email styling
- Mobile-responsive layout
- ATS Checker branding
config/email.js- Email configuration and transporter setupservices/emailService.js- Email sending service classutils/emailTemplates.js- Dark theme HTML email templatesroutes/email.js- Email management API endpoints
components/email/EmailSettings.jsx- Email management interface
Add to your .env file:
# Email Configuration
EMAIL_SERVICE=gmail
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
EMAIL_FROM=ATS Checker <your-email@gmail.com>
ENABLE_EMAIL_NOTIFICATIONS=true
FRONTEND_URL=http://localhost:5173Add to your .env file:
VITE_ENABLE_EMAIL_NOTIFICATIONS=true- Enable 2-Factor Authentication
- Generate App Password:
- Go to Google Account → Security
- 2-Step Verification → App passwords
- Generate password for "Mail"
- Use the app password in
EMAIL_PASS
- Outlook/Hotmail: Use
smtp-mail.outlook.com:587 - Yahoo: Use
smtp.mail.yahoo.com:587 - Custom SMTP: Configure HOST and PORT accordingly
- New User Registration: Welcome email with onboarding
- Report Completion: Detailed analysis results with dashboard stats
- Dark Theme: All emails match the application's dark design
- Dashboard Summary: Send current statistics and recent reports
- Test Email: Verify email configuration
- Uses Ethereal Email for testing when credentials not configured
- Provides preview URLs for email testing
- No email failures in development
import EmailSettings from '../components/email/EmailSettings';
// Use in settings or dashboard
<EmailSettings />GET /api/email/settings- Get email configuration statusPOST /api/email/test- Send test emailPOST /api/email/dashboard-summary- Send dashboard summary
- ATS score with color coding
- Matched/missing skills overview
- Dashboard statistics
- Direct link to full analysis
- Mobile-responsive design
- Weekly progress overview
- Recent reports summary
- Statistics cards
- Call-to-action buttons
- Background:
#0A0A0A - Cards:
#171717with gradients - Text:
#A3A3A3(primary),#737373(secondary) - Borders:
#262626,#404040 - Success:
#22C55E, Warning:#EAB308, Error:#EF4444
- Rate limiting on email endpoints
- Authentication required for all email actions
- Email validation and sanitization
- Graceful fallback when email service unavailable
- Email sending status logging
- Preview URLs for development testing
- Error handling and reporting
- Service health checks
-
Install Dependencies (already done):
cd backend npm install nodemailer -
Configure Environment Variables:
- Add email settings to backend
.env - Enable notifications in frontend
.env
- Add email settings to backend
-
Deploy Changes:
- Backend: Update server with new email routes
- Frontend: Add EmailSettings component to settings page
-
Test Email Service:
- Use the test email feature in EmailSettings
- Verify welcome emails on new registrations
- Check report completion emails
When using development mode with Ethereal Email, preview URLs are logged to console:
📧 Email preview URL: https://ethereal.email/message/...
- User Engagement: Automatic notifications keep users informed
- Professional Experience: Dark theme emails match application branding
- Progress Tracking: Dashboard summaries encourage continued usage
- Development Friendly: Works out-of-the-box in development mode
- Production Ready: Full Gmail/SMTP support for production
This implementation provides a complete email notification system that enhances user experience while maintaining the application's design consistency.