| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System.Text.Json.Serialization;
- namespace OASystem.API.OAMethodLib.MicrosoftGraphMailbox;
- public class GraphSendMailRequest
- {
- [JsonPropertyName("message")]
- public GraphSendMailMessage Message { get; set; } = new();
- [JsonPropertyName("saveToSentItems")]
- public bool SaveToSentItems { get; set; } = true;
- }
- public class GraphSendMailMessage
- {
- [JsonPropertyName("subject")]
- public string Subject { get; set; } = string.Empty;
- [JsonPropertyName("body")]
- public GraphSendMailBody Body { get; set; } = new();
- [JsonPropertyName("toRecipients")]
- public List<GraphSendMailRecipient> ToRecipients { get; set; } = new();
- }
- public class GraphSendMailBody
- {
- [JsonPropertyName("contentType")]
- public string ContentType { get; set; } = "Text";
- [JsonPropertyName("content")]
- public string Content { get; set; } = string.Empty;
- }
- public class GraphSendMailRecipient
- {
- [JsonPropertyName("emailAddress")]
- public GraphSendMailEmail EmailAddress { get; set; } = new();
- }
- public class GraphSendMailEmail
- {
- [JsonPropertyName("address")]
- public string Address { get; set; } = string.Empty;
- }
|