Passed
Push — master ( 219f2b...999eec )
by Aimeos
05:24
created

None::embedAttachment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Metaways Infosystems GmbH, 2013
6
 * @copyright Aimeos (aimeos.org), 2015-2021
7
 * @package MW
8
 * @subpackage Mail
9
 */
10
11
12
namespace Aimeos\MW\Mail\Message;
13
14
15
/**
16
 * Black hole e-mail message implementation.
17
 *
18
 * @package MW
19
 * @subpackage Mail
20
 */
21
class None
22
	implements \Aimeos\MW\Mail\Message\Iface
23
{
24
	/**
25
	 * Adds a source e-mail address of the message.
26
	 *
27
	 * @param string $email Source e-mail address
28
	 * @param string|null $name Name of the user sending the e-mail or null for no name
29
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
30
	 */
31
	public function from( string $email, string $name = null ) : Iface
32
	{
33
		return $this;
34
	}
35
36
37
	/**
38
	 * Adds a destination e-mail address of the target user mailbox.
39
	 *
40
	 * @param string $email Destination address of the target mailbox
41
	 * @param string|null $name Name of the user owning the target mailbox or null for no name
42
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
43
	 */
44
	public function to( string $email, string $name = null ) : Iface
45
	{
46
		return $this;
47
	}
48
49
50
	/**
51
	 * Adds a destination e-mail address for a copy of the message.
52
	 *
53
	 * @param string $email Destination address for a copy
54
	 * @param string|null $name Name of the user owning the target mailbox or null for no name
55
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
56
	 */
57
	public function cc( string $email, string $name = null ) : Iface
58
	{
59
		return $this;
60
	}
61
62
63
	/**
64
	 * Adds a destination e-mail address for a hidden copy of the message.
65
	 *
66
	 * @param string $email Destination address for a hidden copy
67
	 * @param string|null $name Name of the user owning the target mailbox or null for no name
68
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
69
	 */
70
	public function bcc( string $email, string $name = null ) : Iface
71
	{
72
		return $this;
73
	}
74
75
76
	/**
77
	 * Adds the return e-mail address for the message.
78
	 *
79
	 * @param string $email E-mail address which should receive all replies
80
	 * @param string|null $name Name of the user which should receive all replies or null for no name
81
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
82
	 */
83
	public function replyTo( string $email, string $name = null ) : Iface
84
	{
85
		return $this;
86
	}
87
88
89
	/**
90
	 * Adds a custom header to the message.
91
	 *
92
	 * @param string $name Name of the custom e-mail header
93
	 * @param string $value Text content of the custom e-mail header
94
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
95
	 */
96
	public function header( string $name, string $value ) : Iface
97
	{
98
		return $this;
99
	}
100
101
102
	/**
103
	 * Sends the e-mail message to the mail server.
104
	 *
105
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
106
	 */
107
	public function send() : Iface
108
	{
109
		return $this;
110
	}
111
112
113
	/**
114
	 * Sets the e-mail address and name of the sender of the message (higher precedence than "From").
115
	 *
116
	 * @param string $email Source e-mail address
117
	 * @param string|null $name Name of the user who sent the message or null for no name
118
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
119
	 */
120
	public function sender( string $email, string $name = null ) : Iface
121
	{
122
		return $this;
123
	}
124
125
126
	/**
127
	 * Sets the subject of the message.
128
	 *
129
	 * @param string $subject Subject of the message
130
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
131
	 */
132
	public function subject( string $subject ) : Iface
133
	{
134
		return $this;
135
	}
136
137
138
	/**
139
	 * Sets the text body of the message.
140
	 *
141
	 * @param string $message Text body of the message
142
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
143
	 */
144
	public function text( string $message ) : Iface
145
	{
146
		return $this;
147
	}
148
149
150
	/**
151
	 * Sets the HTML body of the message.
152
	 *
153
	 * @param string $message HTML body of the message
154
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
155
	 */
156
	public function html( string $message ) : Iface
157
	{
158
		return $this;
159
	}
160
161
162
	/**
163
	 * Adds an attachment to the message.
164
	 *
165
	 * @param string $data Binary or string @author nose
166
	 * @param string $mimetype Mime type of the attachment (e.g. "text/plain", "application/octet-stream", etc.)
167
	 * @param string|null $filename Name of the attached file (or null if inline disposition is used)
168
	 * @param string $disposition Type of the disposition ("attachment" or "inline")
169
	 * @return \Aimeos\MW\Mail\Message\Iface Message object
170
	 */
171
	public function attach( string $data, string $mimetype, string $filename, string $disposition = 'attachment' ) : Iface
172
	{
173
		return $this;
174
	}
175
176
177
	/**
178
	 * Embeds an attachment into the message and returns its reference.
179
	 *
180
	 * @param string $data Binary or string
181
	 * @param string $mimetype Mime type of the attachment (e.g. "text/plain", "application/octet-stream", etc.)
182
	 * @param string|null $filename Name of the attached file
183
	 * @return string Content ID for referencing the attachment in the HTML body
184
	 */
185
	public function embed( string $data, string $mimetype, string $filename ) : string
186
	{
187
		return '';
188
	}
189
}
190