Skip to content

[IP-394]: apply client and template CC addresses to invoice emails - #695

Merged
nielsdrost7 merged 3 commits into
InvoicePlane:developfrom
KhawarMehfooz:394
Jul 31, 2026
Merged

[IP-394]: apply client and template CC addresses to invoice emails#695
nielsdrost7 merged 3 commits into
InvoicePlane:developfrom
KhawarMehfooz:394

Conversation

@KhawarMehfooz

@KhawarMehfooz KhawarMehfooz commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Checklist

  • My code follows the code formatting guidelines.
  • I have tested my changes locally.
  • I selected the appropriate branch for this PR.
  • I have rebased my changes on top of the selected branch.
  • I included relevant documentation updates if necessary.
  • I have an accompanying issue ID for this pull request.

Description

InvoiceService::sendInvoiceEmail() now CC's the customer's stored CC email addresses (captured via Relation::email_cc / RelationService::syncCcEmails()) and the invoice email template's cc column when queuing an invoice email. Addresses from both sources are merged, validated, and de-duplicated before being passed to Mail::cc().


Related Issue(s)

Fixes #394


Motivation and Context

The capture path for per-client CC emails was already built (client edit form → INVOICE_CC communications), but the send path never read it — InvoiceService::sendInvoiceEmail() only called Mail::to($recipient), so invoices were silently never CC'd despite users configuring the setting. This closes that gap by applying both the client's CC list and the email template's cc field to every outgoing invoice email.


Issue Type (Check one or more)

  • Bugfix
  • Improvement of an existing feature
  • New feature

Screenshots (If Applicable)

N/A


Summary by CodeRabbit

  • New Features

    • Invoice emails now support CC recipients from customer records and invoice email templates.
    • Duplicate and invalid email addresses are filtered automatically.
  • Bug Fixes

    • Invoice emails are sent without a CC field when no valid CC recipients are available.

@KhawarMehfooz KhawarMehfooz changed the title 394 [IP-394]: apply client and template CC addresses to invoice emails Jul 30, 2026
coderabbitai[bot]

This comment was marked as outdated.

…Plane#696)

composer.json declared PHP ^8.3, but pint.json enables mb_str_functions
(mb_trim/mb_ltrim/mb_rtrim, added in PHP 8.4) and every CI workflow pins
php-version 8.4. Installing on real PHP 8.3.x would fatal on any of the
existing mb_trim() call sites. Bumps the composer constraint and README
requirements to 8.4 to match what the project actually needs.
@InvoicePlane InvoicePlane deleted a comment from coderabbitai Bot Jul 31, 2026
@nielsdrost7

Copy link
Copy Markdown
Collaborator

@KhawarMehfooz thanks man! Merged!

@nielsdrost7
nielsdrost7 merged commit 43da92a into InvoicePlane:develop Jul 31, 2026
1 of 3 checks 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.

[Core]: Add CC email addresses per client for invoice emails

2 participants