Skip to content

Commit 48e3a32

Browse files
committed
Add mailer template
1 parent 37b2b2b commit 48e3a32

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"php",
77
"framework",
88
"mvc",
9-
"orm",
109
"tools",
10+
"mailer",
1111
"php-framework"
1212
],
1313
"require" : {
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
%namespace%
3+
4+
%uses%
5+
6+
/**
7+
* Mailer %classname%
8+
**/
9+
class %classname% extends %extendsOrImplements% {
10+
11+
/**
12+
*
13+
* {@inheritdoc}
14+
* @see \Ubiquity\mailer\AbstractMail::bodyText()
15+
*/
16+
public function bodyText() {
17+
return 'Message text';
18+
}
19+
20+
public function __construct() {
21+
parent::__construct();
22+
$this->subject = 'Message title';
23+
$this->from(MailerManager::loadConfig()['from']??'from@organization');
24+
//$this->to($to);
25+
}
26+
27+
/**
28+
*
29+
* {@inheritdoc}
30+
* @see \Ubiquity\mailer\AbstractMail::body()
31+
*/
32+
public function body() {
33+
return '<h1>Message body</h1>';
34+
}
35+
}

0 commit comments

Comments
 (0)