diff --git a/src/Abstracts/EmailAbstract.php b/src/Abstracts/EmailAbstract.php index 274c336eee92f898fc2525c20cffa5bdbda4ffa4..6d314b340971b3a4b9a8fe320a51b837ff7aa899 100644 --- a/src/Abstracts/EmailAbstract.php +++ b/src/Abstracts/EmailAbstract.php @@ -136,7 +136,7 @@ abstract class EmailAbstract implements EmailInterface { throw new Exception( 'Empty email subject' ); } - return $this->subject; + return $this->replace_placeholders( $this->subject ); } /** @@ -158,7 +158,7 @@ abstract class EmailAbstract implements EmailInterface { * @return string */ public function get_heading(): string { - return $this->heading; + return $this->replace_placeholders( $this->heading ); } /** @@ -285,7 +285,7 @@ abstract class EmailAbstract implements EmailInterface { * @throws Exception */ public function get_content(): string { - return $this->content; + return $this->replace_placeholders( $this->content ); } /** diff --git a/src/Mailer.php b/src/Mailer.php index f8b5e02015936930ed7866b5605429b3ea029273..6633b52a5ed24fa0524888876c63d61eae4b364d 100644 --- a/src/Mailer.php +++ b/src/Mailer.php @@ -42,7 +42,7 @@ class Mailer { foreach ( $dirs as $dir ) { $resolver->appendResolver( new DirResolver( $dir ) ); } - $resolver->appendResolver( new DirResolver( __DIR__ ) ); + $resolver->appendResolver( new DirResolver( __DIR__ . '/templates' ) ); return new SimplePhpRenderer( $resolver ); }