1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/app/Mail/BouncedEmail.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2019-05-29 06:33:53 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-29 06:33:53 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-29 06:33:53 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2019-05-29 06:33:53 +02:00
*/
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
2019-05-29 06:33:53 +02:00
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class BouncedEmail extends Mailable
2019-05-29 06:33:53 +02:00
{
public $invitation;
2019-05-29 06:33:53 +02:00
public function __construct($invitation)
{
$this->invitation = $invitation;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$entity_type = class_basename(lcfirst($this->invitation->getEntityType()));
$subject = ctrans("texts.notification_{$entity_type}_bounced_subject", ['invoice' => $invoice->number]);
2019-05-29 06:33:53 +02:00
return
2020-12-03 12:00:34 +01:00
$this->from(config('mail.from.address'), config('mail.from.name'))
2019-05-29 06:33:53 +02:00
->text()
->subject($subject);
}
2021-06-16 12:21:08 +02:00
2019-05-29 06:33:53 +02:00
}