public function handle(MessageSending $sending): void
    {
        $message = $sending->message;

        $converter = new CssToInlineStyles();

        if ($message->getContentType() === 'text/html' ||
            ($message->getContentType() === 'multipart/alternative' && $message->getBody())
        ) {
            $message->setBody($converter->convert($message->getBody()));
        }

        foreach ($message->getChildren() as $part) {
            if (Str::contains($part->getContentType(), 'text/html')) {
                $part->setBody($converter->convert($part->getBody()));
            }
        }
    }
public function handle(MessageSending $sending): void
    {
        $message = $sending->message;

        $converter = new CssToInlineStyles();

        if ($message->getContentType() === 'text/html' ||
            ($message->getContentType() === 'multipart/alternative' && $message->getBody())
        ) {
            $message->setBody($converter->convert($message->getBody()));
        }

        foreach ($message->getChildren() as $part) {
            if (Str::contains($part->getContentType(), 'text/html')) {
                $part->setBody($converter->convert($part->getBody()));
            }
        }
    }
public function handle ( MessageSending $ sending ) : void { $ message = $ sending -> message ; $ converter = new CssToInlineStyles ( ) ; if ( $ message -> getContentType ( ) === 'text/html' || ( $ message -> getContentType ( ) === 'multipart/alternative' && $ message -> getBody ( ) ) ) { $ message -> setBody ( $ converter -> convert ( $ message -> getBody ( ) ) ) ; } foreach ( $ message -> getChildren ( ) as $ part ) { if ( Str :: contains ( $ part -> getContentType ( ) , 'text/html' ) ) { $ part -> setBody ( $ converter -> convert ( $ part -> getBody ( ) ) ) ; } } }
Handle converting to inline CSS.

@param  \Illuminate\Mail\Events\MessageSending  $sending

@return void
Handle converting to inline CSS .