Код: Выделить всё
$emailData = [
"message" => [
"subject" => 'Test',
"body" => [
"contentType" => "text",
"content" => "Test Email!"
],
"toRecipients" => [
[
"emailAddress" => [
"address" => "[email protected]"
]
]
],
"from" => [
"emailAddress" => [
"address" => "[email protected]"
]
]
]
];
$response = Http::withToken($this->token)
->withHeaders(['Content-Type' => 'application/json'])
->post("https://graph.microsoft.com/v1.0/users/[email protected]/sendMail", json_encode($emailData));
Я получаю это только из ответа
Код: Выделить всё
{"error":{"code":"ErrorInternalServerError","message":"An internal server error occurred. The operation failed."}}
Любая помощь приветствуется!
Подробнее здесь: https://stackoverflow.com/questions/790 ... -graph-api