Transactional application mail
Send account activation, password reset, billing, receipt, security, workflow, and other application notifications through Laravel's normal mail pipeline.
Laravel email delivery
Connect Laravel application mail to the EmailDesk API through a custom mail transport. Use it for account events, password flows, billing notices, receipts, queued notifications, and other requested transactional messages that need a controlled sender and visible delivery evidence.
Start your free trialWhat EmailDesk provides
Send account activation, password reset, billing, receipt, security, workflow, and other application notifications through Laravel's normal mail pipeline.
The package registers an emaildesk transport for Symfony Mailer and submits text or HTML messages to the EmailDesk API.
Queued mail can use the transport, but workers perform the API request during job execution. Deployments and retry policy must account for worker lifecycle and uncertain responses.
The From address must be allowed by the API credential. The sending domain must complete the applicable SPF, DKIM, and DMARC setup for the selected gateway.
Missing configuration, invalid messages, cURL failures, invalid responses, and unsuccessful API results become transport exceptions that the application or queue worker can log and handle.
EmailDesk Outbound History records the Laravel source, sender, policy result, queue or provider response, and later outcome evidence when available.
How to begin
The package changes the transport used by the application. Verify the credential and sender first, then test synchronously before moving queued production jobs.
Create a customer-scoped API credential, allow the exact From address or domain, and complete the required sender DNS.
Install the package as a Composer path repository, publish its configuration, and set the EmailDesk endpoint, API key, From identity, and optional gateway profile.
Send one controlled message outside the queue, confirm the Laravel response, and inspect EmailDesk Outbound History before changing the default production mailer.
Clear or rebuild cached configuration as required, restart long-running queue workers after deployment, and monitor failed jobs and EmailDesk evidence during rollout.
Operational evidence
A successful API response means EmailDesk accepted that request for its sending path. It does not guarantee final delivery or inbox placement.
Technical setup
This guide retains the package download, Composer installation, environment configuration, synchronous test, queue-worker rollout, payload, limitation, and troubleshooting details.
Use Laravel 10, 11, or 12 with PHP 8.1 or newer and the PHP cURL extension. In EmailDesk, create an active customer API credential and allow the intended From address or domain.
Publish the SPF, DKIM, and DMARC records required for the selected sending gateway. Sender authentication supports provider evaluation but does not guarantee inbox placement.
Download the current versioned package from EmailDesk:
Download Laravel API package 1.0.0https://app.emaildesk.bd/api/downloads/laravel-pluginmkdir -p packages/emaildesk
unzip emaildesk-laravel-api-sender-1.0.0.zip -d packages/emaildesk
composer config repositories.emaildesk-laravel-api-sender path packages/emaildesk/emaildesk-laravel-api-sender
composer require emaildesk/laravel-api-sender:*
php artisan vendor:publish --provider="EmailDesk\\LaravelApiSender\\EmailDeskApiSenderServiceProvider" --tag=emaildesk-api-sender-configThe package registers an emaildesktransport through the Laravel service provider. Review the published configuration before changing the application's default mailer.
MAIL_MAILER=emaildesk
EMAILDESK_API_ENDPOINT=https://app.emaildesk.bd/api/v1/send
EMAILDESK_API_KEY=YOUR_EMAILDESK_API_KEY
EMAILDESK_FROM_EMAIL=info@example.com
EMAILDESK_FROM_NAME=Example Laravel app
EMAILDESK_MESSAGE_TYPE=transactional
EMAILDESK_PROFILE_NAME=MailChannels
EMAILDESK_TIMEOUT=20Keep the API key in server-side secret management. Do not put it in browser code, source control, screenshots, logs, analytics, or support messages. The configured timeout is clamped between 5 and 60 seconds.
php artisan config:clear
php artisan tinker
Mail::raw('Test email from Laravel through EmailDesk', function ($message) {
$message->to('recipient@example.net')->subject('EmailDesk transport test');
});Confirm the application receives a successful result, then review EmailDesk Outbound History for source laravel, the sender, policy result, message ID, queue state, and provider response.
Rebuild cached configuration as required by the deployment and run php artisan queue:restartso long-running workers load the new transport settings. Start with a narrow queue or controlled job type.
A worker retry can make another API attempt. If a worker loses the response after EmailDesk accepted the request, the package has no application idempotency key to prove the retry is the same send. Keep a stable business event or job record and review failed-job plus EmailDesk evidence before a manual replay.
{
"fromEmail": "info@example.com",
"fromName": "Example Laravel app",
"to": ["customer@example.net"],
"cc": [],
"bcc": [],
"subject": "Welcome",
"body": "Plain-text body",
"html": "<p>Optional HTML body</p>",
"messageType": "transactional",
"profileName": "MailChannels",
"originSource": "laravel"
}The current transport does not serialize mailable attachments. For attachment workflows, use a reviewed direct EmailDesk API integration and follow the documented request and attachment limits.
The transport throws TransportException for missing API configuration, unsupported raw messages, missing recipients or From identity, unavailable cURL, network failures, invalid JSON, non-success HTTP responses, and unsuccessful EmailDesk results.
Log the job or business-event identifier, exception category, HTTP status when available, and returned EmailDesk message ID. Do not log the Authorization header, API key, complete message body, or recipient list.
Frequently asked questions
The current package declares support for Laravel 10, 11, and 12, PHP 8.1 or newer, and compatible Symfony Mailer versions 6 or 7.
Yes. A queued mailable can use the transport through Laravel's mail pipeline. Restart long-running workers after configuration changes and treat each job attempt as a possible API attempt.
The package does not add an application idempotency key. Keep a stable business event or job record, log the returned message ID, and inspect failed-job and EmailDesk evidence before manually replaying an uncertain send.
Not currently. The transport builds text and HTML payloads but does not add mailable attachments. Applications that require attachments should use the documented EmailDesk API payload and limits directly.
Configuration problems, missing recipients or From identity, unavailable PHP cURL, network failures, invalid JSON responses, non-success HTTP responses, and unsuccessful API results produce a transport exception.
No. Sender authentication, provider policy, reputation, content, recipient systems, and later bounce or complaint events still affect the final outcome.
Free guided trial
Submit a short trial request. No package choice, card, or online payment is required before the request is reviewed.