# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased]

### Changed - 2026-01-17
- **Email Sending Mechanism**: Replaced AWS SES with custom SMTP server implementation
  - Removed `boto3.client('ses')` dependency for email sending
  - Added `smtplib` for SMTP email delivery
  - Added SMTP configuration environment variables:
    - `smtp_host`: SMTP server hostname
    - `smtp_port`: SMTP server port (default: 587)
    - `smtp_username`: SMTP authentication username
    - `smtp_password`: SMTP authentication password
    - `smtp_use_tls`: Boolean flag for STARTTLS (default: true)
    - `smtp_use_ssl`: Boolean flag for direct SSL connection (default: false)
  - Updated `CloudwatchDashboardEmailSendFunction/app.py` to use SMTP instead of SES
  - Updated `template.yaml` with SMTP environment variables
  - Added error handling for SMTP connection failures
  - **Note**: CloudWatch client remains unchanged (still using boto3 for dashboard images)

### Technical Details
- SMTP implementation supports both STARTTLS (port 587) and direct SSL (port 465) connections
- Email message construction (MIMEMultipart with embedded images) remains unchanged
- Lambda function now returns structured JSON response with status code and message
- IAM role can have SES permissions removed (no longer needed)

### Important Notes
- **DMARC Authentication**: To resolve DMARC failures, ensure your SMTP server is properly configured with:
  - SPF records authorizing the SMTP server
  - DKIM keys configured and emails being signed
  - DMARC policy alignment
- Coordinate with IT/email administrator to verify SMTP server authentication configuration
