AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector
1.0.0-beta1
This is a prerelease version of AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector --version 1.0.0-beta1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector --version 1.0.0-beta1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector&version=1.0.0-beta1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Google.GMailConnector --version 1.0.0-beta1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta6 | 208 | 11/12/2023 |
1.0.0-beta1 | 105 | 11/1/2023 |