Sending email : "403 Forbidden" Only for MIME message
まだ誰も着手していません。
評価
調査の方向性
createRequest('POST', '/users/.../sendMail') の PHP リクエストから始め、MIME ボディとヘッダーを成功する JSON リクエストと比較します。MIME メッセージに対する Microsoft Graph の sendMail 要件を確認します。リクエストの形式が不正なのか、アカウントに権限がないのかを特定し、必要な修正を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi, I'm using the version 1.110.
I have the following error trying to send an email in MIME type:
Client error: `POST https://graph.microsoft.com/v1.0/users/[EMAIL_ADDRESS]/sendMail` resulted in a `403 Forbidden` response:
{"error":{"code":"ErrorSendAsDenied","message":"The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account., Cannot submit message."}}
The code used to send is the following:
$requestUrl = '/users/' . $username . '/sendMail';
$emailResponse = $this->graphClient->createRequest('POST', $requestUrl)
->addHeaders(["Content-Type" => "text/plain"])
->attachBody(base64_encode(serialize([
"Content-Type" => "text/plain",
'message' => $mimeContent
])))->execute();
With the same email account, if I send an email in Json format I do not have any error.
Any Idea how to solve?
Thanks
Francesco
- 主要言語
- PHP
- スター
- 669
- フォーク
- 150
- 平均マージ
- 15時間 21分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-php のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoftgraph/msgraph-sdk-php#1794 · コメント 2 件 ·
-
bug: metadata type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoftgraph/msgraph-sdk-php#1739 · コメント 6 件 ·
-
status:waiting-for-triage type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
microsoftgraph/msgraph-sdk-php#1643 · コメント 8 件 · リアクション 4 件 ·
-
status:waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoftgraph/msgraph-sdk-php#1800 · リアクション 1 件 ·
-
Now オープン
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
microsoftgraph/msgraph-sdk-php の issue をすべて見る
似ている issue
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
Перевод устарел
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100