sharasolns/sdp-email
Composer 安装命令:
composer require sharasolns/sdp-email
包简介
An SDP Email API transport for Laravel Mail.
README 文档
README
Send Laravel mailables through the SDP Email HTTP API. The package adds an
sdp Laravel mail transport and is auto-discovered after installation.
Install
composer require sharasolns/sdp-email
Configure the application:
MAIL_MAILER=sdp SDP_EMAIL_KEY=sdp_your_api_key MAIL_FROM_ADDRESS=hello@example.com MAIL_FROM_NAME="${APP_NAME}"
The sending domain must be registered in SDP Email, enabled for outbound sending, and allowed by the API key.
Use Laravel Mail normally:
use Illuminate\Support\Facades\Mail; Mail::raw('Sent through SDP Email.', function ($message) { $message->to('person@example.net')->subject('Hello'); });
Mailables, queued mail, HTML and text bodies, CC, BCC, reply-to addresses, custom headers, and file attachments are supported.
Configuration
Like Laravel's Mailgun integration, the mailer belongs in config/mail.php
and its credentials belong in config/services.php. Package discovery adds
both defaults automatically, so most applications only need these environment
variables:
SDP_EMAIL_KEY= SDP_EMAIL_ENDPOINT=https://email.sdp-platform.com SDP_EMAIL_TIMEOUT=10
If you keep explicit configuration in your application, use:
// config/services.php 'sdp' => [ 'key' => env('SDP_EMAIL_KEY'), 'endpoint' => env('SDP_EMAIL_ENDPOINT', 'https://email.sdp-platform.com'), 'timeout' => (float) env('SDP_EMAIL_TIMEOUT', 10), ],
// config/mail.php 'mailers' => [ 'sdp' => [ 'transport' => 'sdp', ], ],
Mailer-level key, endpoint, and timeout values remain supported when
separate credentials are needed for a specific mailer.
Development
composer install
composer test
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-09