generated from boboko/starter
account pages: login, order history, order details, account details, wishlist
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
|
||||
/**
|
||||
* The code that confirms a new login email — see Account\EmailController.
|
||||
*/
|
||||
class EmailChangeCodeMail extends Mailable
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $code,
|
||||
) {}
|
||||
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(subject: 'Επιβεβαίωσε το νέο σου email');
|
||||
}
|
||||
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(view: 'emails.email-change-code');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
|
||||
/**
|
||||
* Sent to the OLD address once the login email has changed (see
|
||||
* Account\EmailController), so the owner notices a takeover. The new address
|
||||
* is shown masked, e.g. "n•••@example.com".
|
||||
*/
|
||||
class EmailChangedNoticeMail extends Mailable
|
||||
{
|
||||
public readonly string $maskedEmail;
|
||||
|
||||
public function __construct(string $newEmail)
|
||||
{
|
||||
[$local, $domain] = explode('@', $newEmail, 2);
|
||||
|
||||
$this->maskedEmail = mb_substr($local, 0, 1).'•••@'.$domain;
|
||||
}
|
||||
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(subject: 'Το email του λογαριασμού σου άλλαξε');
|
||||
}
|
||||
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(view: 'emails.email-changed-notice');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user