AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector
1.0.0-beta6
dotnet add package AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector --version 1.0.0-beta6
NuGet\Install-Package AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector -Version 1.0.0-beta6
<PackageReference Include="AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector" Version="1.0.0-beta6" />
paket add AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector --version 1.0.0-beta6
#r "nuget: AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector, 1.0.0-beta6"
// Install AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector as a Cake Addin #addin nuget:?package=AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector&version=1.0.0-beta6&prerelease // Install AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector as a Cake Tool #tool nuget:?package=AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector&version=1.0.0-beta6&prerelease
AzureAI Community Microsoft Semantic Kernel Plugin - Google GMailConnector
The AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector
This component offers send email using GMail
Building a Google GMail Connector
This guide will lead you through the steps of creating a plugin for utilizing Gmail services to send and retrieve emails.
Prerequisites
Install AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector package from nuget server
Plugin Building Steps
Create an Instance of GMailConnector
The GMailConnector
class is responsible for sending emails. You need to provide an instance of the GmailService class to this class.
Here's an example code snippet:
GmailService gmailService;
IEmailConnector gMailConnector = new GMailConnector(gmailService);
Importing a Plugin into the Kernel
To import a Plugin into the kernel, you can use the following C# code snippet:
EmailPlugin emailPlugin = new EmailPlugin(gMailConnector);
var gmail = kernel.ImportFunctions(emailPlugin, nameof(EmailPlugin));
Running a Plugin within the Kernel
To run a plugin within the kernel and dispatch an email., you can use the following C# code snippet:
var result = await kernel.RunAsync("Bot composer", gmail["SendEmail"]);
Output
Console.WriteLine(result);
Get my email address
SKContext emailAddressResult = await kernel.RunAsync(string.Empty, gmail["GetMyEmailAddress"]);
string myEmailAddress = emailAddressResult.Result;
GetMessagesAsync
SKContext emailAddressResult = await kernel.RunAsync(string.Empty, gmail["GetMessagesAsync"]);
var messages = emailAddressResult.Result;
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Google.Apis.Discovery.v1 (>= 1.62.0)
- Google.Apis.Gmail.v1 (>= 1.62.1.3217)
- Google.Apis.PeopleService.v1 (>= 1.63.0.3093)
- Microsoft.SemanticKernel (>= 1.0.0-beta3)
- Microsoft.SemanticKernel.Plugins.MsGraph (>= 1.0.0-beta3)
- MimeKit (>= 4.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta6 | 205 | 11/12/2023 |
1.0.0-beta1 | 101 | 11/1/2023 |