Browse Source

Auto-set template name based on action

Jad Bitar 10 years ago
parent
commit
58275ffa73
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Mailer/Mailer.php

+ 4 - 0
src/Mailer/Mailer.php

@@ -226,6 +226,10 @@ abstract class Mailer implements ArrayAccess, EventListenerInterface
 
         call_user_func_array([$this, $action], $args);
 
+        if (empty($this->template)) {
+            $this->template = $action;
+        }
+
         $result = $this->_email
             ->profile((array)$this)
             ->send();