Skip to content

Commit 782a967

Browse files
committed
Add beforeBuild method
1 parent 2a97c61 commit 782a967

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Ubiquity/mailer/AbstractMail.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,16 @@ abstract public function body();
265265
*/
266266
abstract protected function initialize();
267267

268+
/**
269+
* Called before the mail build
270+
* To override
271+
*/
272+
protected function beforeBuild() {}
273+
268274
public function bodyText() {}
269275

270276
public function build(PHPMailer $mailer) {
271-
$this->initialize();
277+
$this->beforeBuild();
272278
foreach ($this->swapMethods as $property => $method) {
273279
$values = $this->{$property};
274280
if (! isset($values['email'])) {

0 commit comments

Comments
 (0)