1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00

Merge pull request #4981 from turbo124/v5-develop

Custom reply to and from name
This commit is contained in:
David Bomba 2021-02-24 10:40:01 +11:00 committed by GitHub
commit e08e375d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -82,6 +82,8 @@ class PostMarkController extends BaseController
$this->invitation->email_error = $request->input('Details');
$this->invitation->save();
}
else
return response()->json(['message' => 'Message not found']);
switch ($request->input('RecordType'))
{

View File

@ -72,6 +72,18 @@ class NinjaMailerJob implements ShouldQueue
/* Set the email driver */
$this->setMailDriver();
if (strlen($this->nmo->settings->reply_to_email) > 1) {
$reply_to_name = strlen($this->nmo->settings->reply_to_email) > 1 ? $this->nmo->settings->reply_to_email : $this->nmo->company->present()->name();
$this->nmo->mailable->replyTo($this->nmo->settings->reply_to_email, $reply_to_name);
}
if (strlen($settings->bcc_email) > 1) {
$this->nmo->mailable->bcc($settings->bcc_email, $settings->bcc_email);
}
//send email
try {
nlog("trying to send");

View File

@ -53,10 +53,7 @@ class TemplateEmail extends Mailable
$company = $this->client->company;
$this->from(config('mail.from.address'), $this->company->present()->name());
if (strlen($settings->reply_to_email) > 1)
$this->replyTo($settings->reply_to_email, $settings->reply_to_email);
if (strlen($settings->bcc_email) > 1)
$this->bcc($settings->bcc_email, $settings->bcc_email);