2017-10-13 85 views
0

我正在開發一個SharePoint提供使用CSOM託管加載項和使用發送電子郵件時拒絕訪問我在:SharePoint Online中提供主機發送電子郵件 - 訪問被拒絕

EmailProperties emailProperties = new EmailProperties(); 
emailProperties.To = emailAddresses; 
emailProperties.From = "[email protected]"; 
emailProperties.Body = @"XXXXX"; 
emailProperties.Subject = viagem.Title; 

Utility.SendEmail(context, emailProperties); 
context.ExecuteQuery(); 

[ServerUnauthorizedAccessException:拒絕訪問。您沒有執行此操作或訪問此資源 權限]
Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(流 responseStream)2911
Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()1564

應用程序已經有一些權限:

<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" /> 
<AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="Read" /> 
<AppPermissionRequest Scope="http://sharepoint/bcs/connection" Right="Read" /> 

我有兩個問題:

1-我需要添加什麼權限?

2-我嘗試使用「[email protected]」作爲發件人,因爲這是工作流中用作發件人的地址。 任何人都知道SharePoint Online中的電子郵件的默認電子郵件地址是什麼?

謝謝

回答