1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Messenger\Mail; |
4
|
|
|
|
5
|
|
|
use Cronario\AbstractJob; |
6
|
|
|
|
7
|
|
|
class Job extends AbstractJob |
8
|
|
|
{ |
9
|
|
|
|
10
|
|
|
const P_PARAM_FROM_MAIL = 'fromMail'; |
11
|
|
|
const P_PARAM_FROM_NAME = 'fromName'; |
12
|
|
|
const P_PARAM_TO_MAIL = 'toMail'; |
13
|
|
|
const P_PARAM_SUBJECT = 'subject'; |
14
|
|
|
const P_PARAM_BODY = 'body'; |
15
|
|
|
|
16
|
|
|
const P_PARAM_ATTACHMENT = 'attachment'; |
17
|
|
|
const P_PARAM_ATTACHMENT__PATH = 'p'; |
18
|
|
|
const P_PARAM_ATTACHMENT__NAME = 'n'; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @return int|null|string |
22
|
|
|
*/ |
23
|
3 |
|
public function getFromMail() |
24
|
|
|
{ |
25
|
3 |
|
return $this->getParam(self::P_PARAM_FROM_MAIL); |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @param $value |
30
|
|
|
* |
31
|
|
|
* @return $this |
32
|
|
|
*/ |
33
|
3 |
|
public function setFromMail($value) |
34
|
|
|
{ |
35
|
3 |
|
return $this->setParam(self::P_PARAM_FROM_MAIL, $value); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return int|null|string |
40
|
|
|
*/ |
41
|
3 |
|
public function getFromName() |
42
|
|
|
{ |
43
|
3 |
|
return $this->getParam(self::P_PARAM_FROM_NAME); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @param $value |
48
|
|
|
* |
49
|
|
|
* @return $this |
50
|
|
|
*/ |
51
|
3 |
|
public function setFromName($value) |
52
|
|
|
{ |
53
|
3 |
|
return $this->setParam(self::P_PARAM_FROM_NAME, $value); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return int|null|string |
58
|
|
|
*/ |
59
|
3 |
|
public function getToMail() |
60
|
|
|
{ |
61
|
3 |
|
return $this->getParam(self::P_PARAM_TO_MAIL); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @param $value |
66
|
|
|
* |
67
|
|
|
* @return $this |
68
|
|
|
*/ |
69
|
3 |
|
public function setToMail($value) |
70
|
|
|
{ |
71
|
3 |
|
return $this->setParam(self::P_PARAM_TO_MAIL, $value); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @return int|null|string |
76
|
|
|
*/ |
77
|
3 |
|
public function getSubject() |
78
|
|
|
{ |
79
|
3 |
|
return $this->getParam(self::P_PARAM_SUBJECT); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @param $value |
84
|
|
|
* |
85
|
|
|
* @return $this |
86
|
|
|
*/ |
87
|
3 |
|
public function setSubject($value) |
88
|
|
|
{ |
89
|
3 |
|
return $this->setParam(self::P_PARAM_SUBJECT, $value); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return int|null|string |
94
|
|
|
*/ |
95
|
3 |
|
public function getBody() |
96
|
|
|
{ |
97
|
3 |
|
return $this->getParam(self::P_PARAM_BODY); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @param $value |
102
|
|
|
* |
103
|
|
|
* @return $this |
104
|
|
|
*/ |
105
|
3 |
|
public function setBody($value) |
106
|
|
|
{ |
107
|
3 |
|
return $this->setParam(self::P_PARAM_BODY, $value); |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return int|null|string |
112
|
|
|
*/ |
113
|
2 |
|
public function getAttachment() |
114
|
|
|
{ |
115
|
2 |
|
return $this->getParam(self::P_PARAM_ATTACHMENT); |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param $value |
120
|
|
|
* |
121
|
|
|
* @return $this |
122
|
|
|
*/ |
123
|
2 |
|
public function setAttachment($value) |
124
|
|
|
{ |
125
|
2 |
|
return $this->setParam(self::P_PARAM_ATTACHMENT, $value); |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
} |