Update 'src/MailTemplate.php'

This commit is contained in:
Maxime 2023-01-14 19:00:26 +01:00
parent 026d944c98
commit e55b5192fd
1 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ class MailTemplate implements \JsonSerializable
*/ */
public function sender(string $address, string $name = null): MailTemplate public function sender(string $address, string $name = null): MailTemplate
{ {
$this->sender['address'] = $address; $this->sender['email'] = $address;
if (! empty($name)) if (! empty($name))
$this->sender['name'] = $name; $this->sender['name'] = $name;
@ -83,7 +83,7 @@ class MailTemplate implements \JsonSerializable
*/ */
public function replyTo(string $address, string $name = null): MailTemplate public function replyTo(string $address, string $name = null): MailTemplate
{ {
$this->replyTo['address'] = $address; $this->replyTo['email'] = $address;
if (! empty($name)) if (! empty($name))
$this->replyTo['name'] = $name; $this->replyTo['name'] = $name;
@ -101,7 +101,7 @@ class MailTemplate implements \JsonSerializable
foreach ($recipients as $recipient) { foreach ($recipients as $recipient) {
if (!empty($recipient[0]) && is_string($recipient[0])) { if (!empty($recipient[0]) && is_string($recipient[0])) {
$data = [ $data = [
'address' => $recipient[0] 'email' => $recipient[0]
]; ];
if (!empty($recipient[1])) { if (!empty($recipient[1])) {
@ -128,7 +128,7 @@ class MailTemplate implements \JsonSerializable
public function addRecipient(string $address, array $informations = []): MailTemplate public function addRecipient(string $address, array $informations = []): MailTemplate
{ {
$data = [ $data = [
'address' => $address 'email' => $address
]; ];
if (!empty($informations)) { if (!empty($informations)) {