Skip to content

Commit 18674e5

Browse files
[FIX] Remove return and return type so sending works
1 parent e129c9d commit 18674e5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/AdminResources/Emails.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function (array $m) use ($attachments) {
193193
/**
194194
* @throws Exception
195195
*/
196-
public function send(): MsGraphAdmin
196+
public function send(): void
197197
{
198198
if (strlen($this->userId) === 0) {
199199
throw new Exception('userId is required.');
@@ -211,13 +211,13 @@ public function send(): MsGraphAdmin
211211
throw new Exception('Comment is only used for replies and forwarding, please use body instead.');
212212
}
213213

214-
return MsGraphAdmin::post('users/'.$this->userId.'/sendMail', self::prepareEmail());
214+
MsGraphAdmin::post('users/'.$this->userId.'/sendMail', self::prepareEmail());
215215
}
216216

217217
/**
218218
* @throws Exception
219219
*/
220-
public function reply(): MsGraphAdmin
220+
public function reply()
221221
{
222222
if (strlen($this->userId) === 0) {
223223
throw new Exception('userId is required.');
@@ -231,13 +231,13 @@ public function reply(): MsGraphAdmin
231231
throw new Exception('Body is only used for sending new emails, please use comment instead.');
232232
}
233233

234-
return MsGraphAdmin::post('users/'.$this->userId.'/messages/'.$this->id.'/replyAll', self::prepareEmail());
234+
MsGraphAdmin::post('users/'.$this->userId.'/messages/'.$this->id.'/replyAll', self::prepareEmail());
235235
}
236236

237237
/**
238238
* @throws Exception
239239
*/
240-
public function forward(): MsGraphAdmin
240+
public function forward()
241241
{
242242
if (strlen($this->userId) === 0) {
243243
throw new Exception('userId is required.');
@@ -251,19 +251,19 @@ public function forward(): MsGraphAdmin
251251
throw new Exception('Body is only used for sending new emails, please use comment instead.');
252252
}
253253

254-
return MsGraphAdmin::post('users/'.$this->userId.'/messages/'.$this->id.'/forward', self::prepareEmail());
254+
MsGraphAdmin::post('users/'.$this->userId.'/messages/'.$this->id.'/forward', self::prepareEmail());
255255
}
256256

257257
/**
258258
* @throws Exception
259259
*/
260-
public function delete(string $id): MsGraphAdmin
260+
public function delete(string $id)
261261
{
262262
if ($this->userId == null) {
263263
throw new Exception('userId is required.');
264264
}
265265

266-
return MsGraphAdmin::delete('users/'.$this->userId.'/messages/'.$id);
266+
MsGraphAdmin::delete('users/'.$this->userId.'/messages/'.$id);
267267
}
268268

269269
protected function prepareEmail(): array

0 commit comments

Comments
 (0)