使用Gmail API时解码html电子邮件正文的正确方法是什么。
// Expected: "<p><strong>Test test</strong></p>"
$message = $gmail->users_messages->get('me', $messageId);
$payload = $message->getPayload();
$body = $payload->getBody()->data;
Log::info('Raw body:', [$body]); // "PHA-PHN0cm9uZz5UZXN0IHRlc3Q8L3N0cm9uZz48L3A-"
Log::info('Base64 decoded body:', [base64_decode($body)]); // NO OUTPUT
Log::info('UTF8 encoded body:', [utf8_encode($body)]); // "PHA-PHN0cm9uZz5UZXN0IHRlc3Q8L3N0cm9uZz48L3A-"
Log::info('Quote print decoded:', [quoted_printable_decode($body)]); // "PHA-PHN0cm9uZz5UZXN0IHRlc3Q8L3N0cm9uZz48L3A-"
Log::info('Quote print decoded:', [quoted_printable_decode(base64_decode($body)))]); // NO OUTPUT