Skip to content

feat(invoicing): INV-002 - Email Invoice to Customer on Delivery - #72

Merged
hajk1 merged 8 commits into
hajk1:masterfrom
michal-bakshi:feat/INV-002-send-invoice-email
May 2, 2026
Merged

feat(invoicing): INV-002 - Email Invoice to Customer on Delivery#72
hajk1 merged 8 commits into
hajk1:masterfrom
michal-bakshi:feat/INV-002-send-invoice-email

Conversation

@michal-bakshi

Copy link
Copy Markdown
Contributor

Summary

Added automated invoice email delivery to customers when freight orders are delivered.

Changes

  • InvoiceController: POST /api/v1/invoices/{orderId}/send endpoint
  • InvoiceEmailService: Sends invoice PDF to customer email (validates DELIVERED status)
  • SmtpEmailService: Added sendEmailWithAttachment() for PDF attachments
  • InvoiceEmailServiceTest: Comprehensive unit tests for happy path and error cases
  • Made SmtpEmailService conditional on JavaMailSender bean presence
  • Added NoOpEmailService as fallback for test environments

Testing

  • All unit tests pass
  • Manual testing verified with MailHog - emails received with PDF attachments correctly

@hajk1
hajk1 merged commit fd5ecf1 into hajk1:master May 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants