Class SmtpTool
A built-in tool for sending emails via SMTP.
Enables agents to send email notifications and messages.
public sealed class SmtpTool : ITool
- Inheritance
-
SmtpTool
- Implements
- Inherited Members
Examples
var tool = new SmtpTool(new SmtpToolOptions
{
Host = "smtp.example.com",
Port = 587,
Username = "user@example.com",
Password = "password",
UseSsl = true
});
registry.Register(tool);
Remarks
Requires SMTP server configuration. Consider security implications when enabling email capabilities for agents.
Constructors
- SmtpTool(SmtpToolOptions)
Initializes a new instance with the specified options.
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.