1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

BCC email

This commit is contained in:
Hillel Coren 2017-01-06 15:24:53 +02:00
parent 0938c4cb1a
commit c8345e8fc1
5 changed files with 16 additions and 1 deletions

View File

@ -959,6 +959,7 @@ class AccountController extends BaseController
$account->pdf_email_attachment = Input::get('pdf_email_attachment') ? true : false;
$account->document_email_attachment = Input::get('document_email_attachment') ? true : false;
$account->email_design_id = Input::get('email_design_id');
$account->bcc_email = Input::get('bcc_email');
if (Utils::isNinja()) {
$account->enable_email_markup = Input::get('enable_email_markup') ? true : false;

View File

@ -199,6 +199,7 @@ class ContactMailer extends Mailer
'invoice' => $invoice,
'documents' => $documentStrings,
'notes' => $reminder,
'bcc_email' => $account->isPro() ? $account->bcc_email : false,
];
if ($account->attachPDF()) {
@ -285,6 +286,7 @@ class ContactMailer extends Mailer
'account' => $account,
'payment' => $payment,
'entityType' => ENTITY_INVOICE,
'bcc_email' => $account->isPro() ? $account->bcc_email : false,
];
if ($account->attachPDF()) {

View File

@ -47,6 +47,11 @@ class Mailer
->replyTo($replyEmail, $fromName)
->subject($subject);
// Optionally BCC the email
if (!empty($data['bcc_email'])) {
$message->bcc($data['bcc_email']);
}
// Attach the PDF to the email
if (!empty($data['pdfString']) && !empty($data['pdfFileName'])) {
$message->attachData($data['pdfString'], $data['pdfFileName']);

View File

@ -2304,6 +2304,8 @@ $LANG = array(
'notes_reminder1' => 'First Reminder',
'notes_reminder2' => 'Second Reminder',
'notes_reminder3' => 'Third Reminder',
'bcc_email' => 'BCC Email',
'bcc_email_help' => 'All emails sent to your clients will also be sent to this address.',
);

View File

@ -15,7 +15,8 @@
@include('accounts.nav', ['selected' => ACCOUNT_EMAIL_SETTINGS, 'advanced' => true])
{!! Former::open()->rules([
'iframe_url' => 'url'
'iframe_url' => 'url',
'bcc_email' => 'email',
])->addClass('warn-on-exit') !!}
{{ Former::populate($account) }}
{{ Former::populateField('pdf_email_attachment', intval($account->pdf_email_attachment)) }}
@ -40,6 +41,10 @@
 
{!! Former::text('bcc_email')->help('bcc_email_help') !!}
 
{{-- Former::select('recurring_hour')->options($recurringHours) --}}
{!! Former::inline_radios('custom_invoice_link')