Repository navigation
SmtpMailer
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Services\SmtpMailer is a Mailer implementation based on PHPMailer SMTP transport.
setConfig(array $config): voidcheckConfig(): voidsend(array $recipients, string $subject, string $title, string $text, array $attachments = [], array $ccs = []): void
fromAddressfromNamesmtpHostsmtpPort- when
smtpAuth=true:smtpUsername,smtpPassword
Optional:
-
smtpSecure(ssl/tls) smtpDebugsmtpAuth
use Pair\Services\SmtpMailer;
$mailer = new SmtpMailer([
'fromAddress' => 'noreply@example.com',
'fromName' => 'Pair App',
'smtpHost' => 'smtp.example.com',
'smtpPort' => 587,
'smtpSecure' => 'tls',
'smtpAuth' => true,
'smtpUsername' => 'smtp-user',
'smtpPassword' => 'smtp-pass',
]);
$mailer->send(
[['name' => 'John', 'email' => 'john@example.com']],
'Welcome',
'Welcome',
'Thanks for joining.'
);
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4