crater
crater copied to clipboard
Ability to CC another email address
I have some clients that request to be CC'd or at least have two people receive the invoice. Currently, I have to send to the customer, then copy the invoice URL and manually email.
If I could add multiple emails and separate them with a comma that would solve my issue.
+1 on the feature request
Good idea! we've started working on this 👍
Is this something coming soon?
@mohitpanjwani is there an update on this?
I think I will go ahead and create a PR for this feature.
@dfanica did you create the PR?
@dfanica did you create the PR?
I was waiting for the latest changes before I look into this it... I will do it this weekend
I had a stab at this over the weekend but doing it properly would require a little more time than I'm willing to put in for this so opted for a quick hack instead.
Since all I really need is to add 1 or 2 emails to the CC for the send invoice I've opted for adding a new method in /app/Mail/SendInvoiceMail.php
private function getCC($customer)
{
switch ($customer['email']) {
case 'customer_1_email@which_is_unique.com':
return [
'[email protected]',
'[email protected]'
];
break;
case 'customer_2_email@which_is_unique.com':
return [
'[email protected]',
'[email protected]'
];
break;
}
return false;
}
And all is really needed is calling it before the return from the build
method.
public function build()
{
...
if ($cc = $this->getCC($this->data['customer'])) {
$mailContent->cc($cc);
}
return $mailContent;
}
Good luck guys, and I hope someone will implement it properly.
If I get some time at some point, I will myself. I was thinking of using the custom fields to store the CC emails since you can create records per customer. A bit messy but can be accomplished. A new table that holds these emails with a type being cc
or bcc
, for extra flexibility, and matched by customer email, since it's unique, or id would be better.
@mohitpanjwani Any updates?
+1 on bcc feature request
+1 on this please