Modules@robinpath/email

@robinpath/email

0.1.0Public

SMTP email sending and address parsing for RobinPath

@robinpath/email

SMTP email sending with transports, attachments, address parsing, and Ethereal test accounts

Category Functions Auth License

Why use this module?

The email module lets you:

  • Create a named SMTP transport for sending emails
  • Send an email with full options (to, subject, body, attachments, etc.)
  • Send a simple email with just to, subject, and body
  • Verify SMTP connection to the mail server
  • Validate an email address format

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/email

Quick Start

No credentials needed — start using it right away:

email.send "gmail" {"to": "bob@example.com", "subject": "Hello", "text": "Hi there"}

Available Functions

FunctionDescription
email.createTransportCreate a named SMTP transport for sending emails
email.sendSend an email with full options (to, subject, body, attachments, etc.)
email.sendQuickSend a simple email with just to, subject, and body
email.verifyVerify SMTP connection to the mail server
email.isValidValidate an email address format
email.parseAddressParse an email address string into name and address parts
email.parseAddressListParse a comma-separated list of email addresses
email.extractDomainExtract the domain part from an email address
email.buildAddressBuild a formatted email address from name and email
email.closeClose a transport connection
email.createTestAccountCreate an Ethereal test account for development (no real emails sent)
email.getTestUrlGet the Ethereal preview URL for a test email

Examples

Send an email with full options (to, subject, body, attachments, etc.)

email.send "gmail" {"to": "bob@example.com", "subject": "Hello", "text": "Hi there"}

Send a simple email with just to, subject, and body

email.sendQuick "gmail" "bob@example.com" "Hello" "Hi Bob!"

Verify SMTP connection to the mail server

email.verify "gmail"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/email";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  email.send "gmail" {"to": "bob@example.com", "subject": "Hello", "text": "Hi there"}
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/email
Version0.1.0
LicenseMIT
Unpacked Size6.2 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities