mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
Merge pull request #4981 from turbo124/v5-develop
Custom reply to and from name
This commit is contained in:
commit
e08e375d98
@ -82,6 +82,8 @@ class PostMarkController extends BaseController
|
|||||||
$this->invitation->email_error = $request->input('Details');
|
$this->invitation->email_error = $request->input('Details');
|
||||||
$this->invitation->save();
|
$this->invitation->save();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return response()->json(['message' => 'Message not found']);
|
||||||
|
|
||||||
switch ($request->input('RecordType'))
|
switch ($request->input('RecordType'))
|
||||||
{
|
{
|
||||||
|
@ -72,6 +72,18 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
/* Set the email driver */
|
/* Set the email driver */
|
||||||
$this->setMailDriver();
|
$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
|
//send email
|
||||||
try {
|
try {
|
||||||
nlog("trying to send");
|
nlog("trying to send");
|
||||||
|
@ -53,10 +53,7 @@ class TemplateEmail extends Mailable
|
|||||||
$company = $this->client->company;
|
$company = $this->client->company;
|
||||||
|
|
||||||
$this->from(config('mail.from.address'), $this->company->present()->name());
|
$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)
|
if (strlen($settings->bcc_email) > 1)
|
||||||
$this->bcc($settings->bcc_email, $settings->bcc_email);
|
$this->bcc($settings->bcc_email, $settings->bcc_email);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user