smtp
SMTP email client for sending plain text and HTML emails. Supports TLS, custom headers, template-based sending and multiple recipients.
Install
ppm install smtp
Usage Example
uses smtp;
var cfg: TSMTPConfig;
cfg.Host := 'smtp.gmail.com'; cfg.Port := 587;
cfg.Username := 'me@gmail.com';
cfg.Password := 'app-password';
cfg.UseTLS := True;
// Send HTML email
SendHTML(cfg, 'me@gmail.com', 'you@example.com',
'Welcome!', '.Create;
vars['name'] := 'Alice';
SendTemplate(cfg, 'me@gmail.com', 'alice@example.com',
'Hello {{name}}', '
Welcome to PascalAI
'); // Template-based var vars := DictionaryHi {{name}}, welcome!
', vars);Features
TLS/STARTTLS encryption
HTML and plain text emails
Template-based sending with variables
CC, BCC and multiple recipients
Attachment file support