mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Specify reply-to header #1083
This commit is contained in:
parent
c808681ec3
commit
ec46107dba
@ -173,6 +173,7 @@ class Account extends Eloquent
|
||||
'payment_type_id',
|
||||
'gateway_fee_enabled',
|
||||
'reset_counter_date',
|
||||
'reply_to_email',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -199,7 +199,7 @@ class ContactMailer extends Mailer
|
||||
}
|
||||
|
||||
$subject = $this->templateService->processVariables($subject, $variables);
|
||||
$fromEmail = $user->email;
|
||||
$fromEmail = $account->reply_to_email ?: $user->email;
|
||||
$view = $account->getTemplateView(ENTITY_INVOICE);
|
||||
|
||||
$response = $this->sendTo($invitation->contact->email, $fromEmail, $account->getDisplayName(), $subject, $view, $data);
|
||||
@ -291,9 +291,10 @@ class ContactMailer extends Mailer
|
||||
$data['invoice_id'] = $payment->invoice->id;
|
||||
|
||||
$view = $account->getTemplateView('payment_confirmation');
|
||||
$fromEmail = $account->reply_to_email ?: $user->email;
|
||||
|
||||
if ($user->email && $contact->email) {
|
||||
$this->sendTo($contact->email, $user->email, $accountName, $subject, $view, $data);
|
||||
$this->sendTo($contact->email, $fromEmail, $accountName, $subject, $view, $data);
|
||||
}
|
||||
|
||||
$account->loadLocalizationSettings();
|
||||
|
@ -265,6 +265,7 @@ class AccountTransformer extends EntityTransformer
|
||||
'payment_type_id' => (int) $account->payment_type_id,
|
||||
'gateway_fee_enabled' => (bool) $account->gateway_fee_enabled,
|
||||
'reset_counter_date' => $account->reset_counter_date,
|
||||
'reply_to_email' => $account->reply_to_email,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ class AddGatewayFeeLocation extends Migration
|
||||
}
|
||||
$table->boolean('gateway_fee_enabled')->default(0);
|
||||
$table->date('reset_counter_date')->nullable();
|
||||
$table->string('reply_to_email')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('clients', function ($table) {
|
||||
@ -52,6 +53,7 @@ class AddGatewayFeeLocation extends Migration
|
||||
Schema::table('accounts', function ($table) {
|
||||
$table->dropColumn('gateway_fee_enabled');
|
||||
$table->dropColumn('reset_counter_date');
|
||||
$table->dropColumn('reply_to_email');
|
||||
});
|
||||
|
||||
Schema::table('clients', function ($table) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -2307,7 +2307,6 @@ $LANG = array(
|
||||
'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.',
|
||||
'tax_quote' => 'Tax Quote',
|
||||
'tax_invoice' => 'Tax Invoice',
|
||||
'emailed_invoices' => 'Successfully emailed invoices',
|
||||
@ -2458,6 +2457,9 @@ $LANG = array(
|
||||
'purge_data_message' => 'Warning: This will permanently erase your data, there is no undo.',
|
||||
'contact_phone' => 'Contact Phone',
|
||||
'contact_email' => 'Contact Email',
|
||||
'reply_to_email' => 'Reply-To Email',
|
||||
'reply_to_email_help' => 'Specify the reply-to address for client emails.',
|
||||
'bcc_email_help' => 'Privately include this address with client emails.',
|
||||
|
||||
);
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
{!! Former::open()->rules([
|
||||
'bcc_email' => 'email',
|
||||
'reply_to_email' => 'email',
|
||||
])->addClass('warn-on-exit') !!}
|
||||
|
||||
{{ Former::populate($account) }}
|
||||
@ -32,6 +33,15 @@
|
||||
</div>
|
||||
<div class="panel-body form-padding-right">
|
||||
|
||||
{!! Former::text('reply_to_email')
|
||||
->placeholder(Auth::user()->registered ? Auth::user()->email : ' ')
|
||||
->help('reply_to_email_help') !!}
|
||||
|
||||
{!! Former::text('bcc_email')
|
||||
->help('bcc_email_help') !!}
|
||||
|
||||
|
||||
|
||||
{!! Former::checkbox('pdf_email_attachment')
|
||||
->text(trans('texts.enable'))
|
||||
->value(1)
|
||||
@ -46,10 +56,6 @@
|
||||
|
||||
|
||||
|
||||
{!! Former::text('bcc_email')->help('bcc_email_help') !!}
|
||||
|
||||
|
||||
|
||||
{{-- Former::select('recurring_hour')->options($recurringHours) --}}
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user