@@ -197,7 +197,7 @@ class Message {
197197 * @throws Exceptions\ConnectionFailedException
198198 * @throws InvalidMessageDateException
199199 */
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 ) {
201201
202202 $ default_mask = $ client ->getDefaultMessageMask ();
203203 if ($ default_mask != null ) {
@@ -349,37 +349,14 @@ public function hasHTMLBody() {
349349
350350 /**
351351 * 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
356352 *
357353 * @return string|null
358- *
359- * @deprecated 1.4.0:2.0.0 No longer needed. Use AttachmentMask::getImageSrc() instead
360354 */
361- public function getHTMLBody ($ replaceImages = false ) {
355+ public function getHTMLBody () {
362356 if (!isset ($ this ->bodies ['html ' ])) {
363357 return null ;
364358 }
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 ;
383360 }
384361
385362 /**
0 commit comments