47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace com\fwdekker\deathnotifier\mailer;
|
|
|
|
|
|
/**
|
|
* An email informing a user that their password has been changed.
|
|
*/
|
|
class ChangedPasswordEmail extends Email
|
|
{
|
|
/**
|
|
* A string identifying the type of email.
|
|
*/
|
|
public const TYPE = "changed-password";
|
|
|
|
|
|
/**
|
|
* Constructs an email informing a user that their email has been changed, and needs verification.
|
|
*
|
|
* @param string $recipient the intended recipient of the email
|
|
*/
|
|
public function __construct(string $recipient)
|
|
{
|
|
$this->type = self::TYPE;
|
|
$this->recipient = $recipient;
|
|
}
|
|
|
|
|
|
public function getSubject(): string
|
|
{
|
|
return "Your password has been changed";
|
|
}
|
|
|
|
public function getBody(array $config): string
|
|
{
|
|
$base_path = $config["server"]["base_path"];
|
|
|
|
return
|
|
"You changed the password of your Death Notifier account." .
|
|
"\n\n" .
|
|
"If you did not change the password of your account, go to the Death Notifier website and use the forgot " .
|
|
"password option to change your password back." .
|
|
"\n\n" .
|
|
$base_path;
|
|
}
|
|
}
|