2018-05-26 13:55:11 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* AccessTokenCreatedMail.php
|
2020-02-07 11:16:38 +01:00
|
|
|
* Copyright (c) 2019 james@firefly-iii.org
|
2018-05-26 13:55:11 +02:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
2018-05-26 13:55:11 +02:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2018-05-26 13:55:11 +02:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2018-05-26 13:55:11 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2019-10-02 06:37:26 +02:00
|
|
|
* GNU Affero General Public License for more details.
|
2018-05-26 13:55:11 +02:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-05-26 13:55:11 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Mail;
|
2021-03-28 11:46:23 +02:00
|
|
|
|
2018-05-26 13:55:11 +02:00
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class AccessTokenCreatedMail
|
2019-08-17 10:47:29 +02:00
|
|
|
*
|
2019-07-31 16:53:09 +02:00
|
|
|
* @codeCoverageIgnore
|
2018-05-26 13:55:11 +02:00
|
|
|
*/
|
|
|
|
class AccessTokenCreatedMail extends Mailable
|
|
|
|
{
|
|
|
|
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
|
|
|
/** @var string Email address of admin */
|
|
|
|
public $email;
|
|
|
|
/** @var string IP address of admin */
|
|
|
|
public $ipAddress;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* AccessTokenCreatedMail constructor.
|
|
|
|
*
|
|
|
|
* @param string $email
|
|
|
|
* @param string $ipAddress
|
|
|
|
*/
|
|
|
|
public function __construct(string $email, string $ipAddress)
|
|
|
|
{
|
|
|
|
$this->email = $email;
|
|
|
|
$this->ipAddress = $ipAddress;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
2018-07-22 16:35:46 +02:00
|
|
|
public function build(): self
|
2018-05-26 13:55:11 +02:00
|
|
|
{
|
2021-04-03 12:30:34 +02:00
|
|
|
return $this->view('emails.access-token-created-html')->text('emails.access-token-created-text')
|
2021-03-21 09:15:40 +01:00
|
|
|
->subject((string)trans('email.access_token_created_subject'));
|
2018-05-26 13:55:11 +02:00
|
|
|
}
|
2018-07-22 20:32:02 +02:00
|
|
|
}
|