我该如何解决这个问题?
在第 729 行的 /sendgrid-php/lib/helpers/mail/Mail.php 中调用未定义函数 SendGrid\mb_convert_encoding()
这是我的代码
<?php
require("./sendgrid-php/sendgrid-php.php");
$from = new SendGrid\Email(null, "example@example.com");
$subject = "Sending with SendGrid is Fun";
$to = new SendGrid\Email(null, "example@example.com");
$content = new SendGrid\Content("text/plain", "and easy to do anywhere, even with PHP");
// Send message as html
$mail = new SendGrid\Mail($from, $subject, $to, $content);
$apiKey = getenv('my key');
$sg = new \SendGrid($apiKey);
$response = $sg->client->mail()->send()->post($mail);
echo $response->statusCode();
print_r($response->headers());
echo $response->body();