QR Email specs β
Status β
**π TBC: For decomp **
Purpose β
Define the implementation detail for QR email distribution via Azure Communication Service.
Requirements Implemented β
User Interface Requirements β
User Detail View β
The user detail screen SHALL display:
- "Email QR Code" button
- Email send history section showing:
- Timestamp of each send
- Send status (sent/failed/bounced)
- Error details (if failed)
Send Confirmation Modal β
When clicking "Send Email", a modal SHALL appear showing:
- Confirmation message: "Send QR Code Email?"
- Recipient email address
- Cancel and Send Email buttons
Success Feedback β
After successful send, the system SHALL display:
- Success toast/banner: "β QR code email sent successfully to [email]"
- Timestamp of send
- Azure message ID (for troubleshooting)
Error Feedback β
After failed send, the system SHALL display:
- Error toast/banner: "β Failed to send QR code email"
- Specific error reason (invalid email, service unavailable, rate limit)
- Action buttons: "Try Again" or "Close"
Email Content Requirements β
Email Structure β
Subject Line: "Your Digital Lock On QR Code" From Address: noreply@yourdomain.co.nz (or configured sender address) From Display Name: "Digital Lock On System" Attachment: qr-code-[username].png (300x300px PNG image)
Email Body Content β
The email body SHALL include:
- Personalised greeting with worker name
- Welcome message explaining purpose
- Clear instructions for using the QR code:
- Save to phone or print the QR code
- Keep it secure (contains personal information)
- Must bring it to worksite every day
- Contact administrator if lost or contact details need updating
- QR code details summary:
- User name
- Phone
- Company
- User type (if RPO or Protector)
- Support contact information
- Privacy notice
- Footer with system name and automated message disclaimer
Email Format β
- HTML version: Professionally formatted with branding, styled layout
- Plain text version: Simple text format for email clients without HTML support
- Responsive design: Readable on mobile devices
- Accessibility: High contrast, readable fonts, clear structure
Security & Privacy β
The email SHALL include:
- Privacy notice about encrypted QR code
- Warning not to share QR code with others
- Information about QR code expiry (if applicable)
- Contact details for support or reissue requests