2023-03-10 06:27:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Appwrite\Utopia\Response\Model;
|
|
|
|
|
|
|
|
|
|
use Appwrite\Utopia\Response;
|
|
|
|
|
|
2023-04-10 01:03:48 +00:00
|
|
|
class TemplateEmail extends Template
|
2023-03-10 06:27:30 +00:00
|
|
|
{
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
2023-03-14 07:21:56 +00:00
|
|
|
parent::__construct();
|
2023-03-10 06:27:30 +00:00
|
|
|
$this
|
|
|
|
|
->addRule('senderName', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Name of the sender',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'My User',
|
|
|
|
|
])
|
|
|
|
|
->addRule('senderEmail', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Email of the sender',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'mail@appwrite.io',
|
|
|
|
|
])
|
|
|
|
|
->addRule('replyTo', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Reply to email address',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'emails@appwrite.io',
|
|
|
|
|
])
|
|
|
|
|
->addRule('subject', [
|
|
|
|
|
'type' => self::TYPE_STRING,
|
|
|
|
|
'description' => 'Email subject',
|
|
|
|
|
'default' => '',
|
|
|
|
|
'example' => 'Please verify your email address',
|
|
|
|
|
])
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Name
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getName(): string
|
|
|
|
|
{
|
2023-03-10 11:04:11 +00:00
|
|
|
return 'EmailTemplate';
|
2023-03-10 06:27:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Type
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getType(): string
|
|
|
|
|
{
|
2023-03-10 11:04:11 +00:00
|
|
|
return Response::MODEL_EMAIL_TEMPLATE;
|
2023-03-10 06:27:30 +00:00
|
|
|
}
|
|
|
|
|
}
|