Skip to content

Commit

Permalink
Added deprecation notice on the SharePoint Mail API
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Dec 3, 2024
1 parent ad70758 commit 572d697
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions documentation/Send-PnPMail.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Allows sending an e-mail
Send-PnPMail -From <String> -To <String[]> -Subject <String> -Body <String> [-Cc <String[]>] [-Bcc <String[]>] [-ReplyTo <String[]>] [-Importance <MessageImportanceType>] [-BodyContentType <MessageBodyContentType>] [-SaveToSentItems <bool>] [-Connection <PnPConnection>] [-Verbose] [-Attachments <String[]>]
```

### Send through Microsoft Graph with attachments from SPO
### Send through Microsoft Graph with attachments from SharePoint Online

```powershell
Send-PnPMail -From <String> -To <String[]> -Subject <String> -Body <String> [-Cc <String[]>] [-Bcc <String[]>] [-ReplyTo <String[]>] [-Importance <MessageImportanceType>] [-BodyContentType <MessageBodyContentType>] [-SaveToSentItems <bool>] [-Connection <PnPConnection>] [-Verbose] [-Files <String[]>]
Expand All @@ -36,6 +36,8 @@ Send-PnPMail -To <String[]> -Subject <String> -Body <String> [-Cc <String[]>] [-

Allows sending an e-mail through SharePoint Online or Microsoft Graph. Sending e-mail through Microsoft Graph requires the **Mail.Send** permission.

In October 2025, [Microsoft will remove the API](https://support.microsoft.com/office/retirement-of-the-sharepoint-sendemail-api-b35bbab1-7d09-455f-8737-c2de63fe0821) which is being used to send e-mail through SharePoint. It is therefore highly recommended to use the Microsoft Graph option listed above instead.

## EXAMPLES

### EXAMPLE 1
Expand Down Expand Up @@ -261,4 +263,4 @@ Accept wildcard characters: False
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

0 comments on commit 572d697

Please sign in to comment.