@@ -197,7 +197,7 @@ class Message {
197
197
* @throws Exceptions\ConnectionFailedException
198
198
* @throws InvalidMessageDateException
199
199
*/
200
- public function __construct ($ uid , $ msglist , Client $ client , $ fetch_options = null , $ fetch_body = false , $ fetch_attachment = false , $ fetch_flags = false ) {
200
+ public function __construct ($ uid , $ msglist , Client $ client , $ fetch_options = null , $ fetch_body = null , $ fetch_attachment = null , $ fetch_flags = null ) {
201
201
202
202
$ default_mask = $ client ->getDefaultMessageMask ();
203
203
if ($ default_mask != null ) {
@@ -349,37 +349,14 @@ public function hasHTMLBody() {
349
349
350
350
/**
351
351
* Get the Message html body
352
- * If $replaceImages is callable it should expect string $body as first parameter, $oAttachment as second and return
353
- * the resulting $body.
354
- *
355
- * @var bool|callable $replaceImages
356
352
*
357
353
* @return string|null
358
- *
359
- * @deprecated 1.4.0:2.0.0 No longer needed. Use AttachmentMask::getImageSrc() instead
360
354
*/
361
- public function getHTMLBody ($ replaceImages = false ) {
355
+ public function getHTMLBody () {
362
356
if (!isset ($ this ->bodies ['html ' ])) {
363
357
return null ;
364
358
}
365
-
366
- $ body = $ this ->bodies ['html ' ]->content ;
367
- if ($ replaceImages !== false ) {
368
- $ this ->attachments ->each (function ($ oAttachment ) use (&$ body , $ replaceImages ) {
369
- /** @var Attachment $oAttachment */
370
- if (is_callable ($ replaceImages )) {
371
- $ body = $ replaceImages ($ body , $ oAttachment );
372
- }elseif (is_string ($ replaceImages )) {
373
- call_user_func ($ replaceImages , [$ body , $ oAttachment ]);
374
- }else {
375
- if ($ oAttachment ->id && $ oAttachment ->getImgSrc () != null ) {
376
- $ body = str_replace ('cid: ' .$ oAttachment ->id , $ oAttachment ->getImgSrc (), $ body );
377
- }
378
- }
379
- });
380
- }
381
-
382
- return $ body ;
359
+ return $ this ->bodies ['html ' ]->content ;
383
360
}
384
361
385
362
/**
0 commit comments