@agentuity/email
A standalone package for the Agentuity Email service.
Installation
npm install @agentuity/email
Quick Start
import { EmailClient } from '@agentuity/email';
const client = new EmailClient();
const addr = await client.createAddress('support');
console.log('Created:', addr.email);
const result = await client.send({
from: addr.email,
to: ['user@example.com'],
subject: 'Welcome!',
text: 'Welcome to our platform.',
html: '<h1>Welcome!</h1><p>Welcome to our platform.</p>'
});
const inbound = await client.listInbound(addr.id);
for (const msg of inbound) {
console.log(`From: ${msg.from}, Subject: ${msg.subject}`);
}
Configuration
const client = new EmailClient({
apiKey: 'your-api-key',
url: 'https://api.agentuity.com',
});
Environment Variables
AGENTUITY_SDK_KEY | API key for authentication | Required |
AGENTUITY_REGION | Region for API endpoints | usc |
AGENTUITY_EMAIL_URL | Override Email API URL | Auto-detected |
License
Apache-2.0