appwrite/docs/examples/1.5.x/server-dotnet/examples/messaging/create-email.md

25 lines
820 B
Markdown
Raw Normal View History

2024-02-05 12:40:51 +00:00
using Appwrite;
using Appwrite.Models;
2024-02-27 08:12:00 +00:00
using Appwrite.Services;
2024-02-05 12:40:51 +00:00
2024-02-21 11:31:50 +00:00
Client client = new Client()
2024-02-05 12:40:51 +00:00
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("5df5acd0d48c2") // Your project ID
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
2024-02-21 11:31:50 +00:00
Messaging messaging = new Messaging(client);
2024-02-05 12:40:51 +00:00
Message result = await messaging.CreateEmail(
2024-02-24 11:34:42 +00:00
messageId: "<MESSAGE_ID>",
subject: "<SUBJECT>",
content: "<CONTENT>",
2024-02-21 11:31:50 +00:00
topics: new List<string>(), // optional
users: new List<string>(), // optional
targets: new List<string>(), // optional
cc: new List<string>(), // optional
bcc: new List<string>(), // optional
attachments: new List<string>(), // optional
2024-02-27 08:12:00 +00:00
draft: false, // optional
2024-02-21 11:31:50 +00:00
html: false, // optional
scheduledAt: "" // optional
);