Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Mail Aliyun Laravel Package

overtrue/laravel-mail-aliyun

Send mail through Aliyun DirectMail from any Laravel app. Add your Aliyun access keys and region to config/mail.php, then use Laravel's familiar Mail API, mailables, notifications, and queued jobs—no custom code required. Integrates cleanly with existing mail configuration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • This is a Laravel mail-transport adapter that plugs into the framework's Mailer/Transport layer, so it is a leaf dependency rather than an architectural driver. Fit is good where the application already sends through DirectMail's API and wants to avoid an SMTP hop.
  • 4.0.0 aligns the package with the modern Laravel mail stack (Symfony Mailer replacing SwiftMailer), which is the correct direction — SwiftMailer has been unmaintained since 2021. Pre-4.0 releases were effectively dead on current Laravel, so this is a restoration rather than an enhancement.
  • The package is now deliberately narrower: it is a "simple transactional mail" transport. Teams that depend on BCC, envelope-only hidden recipients, attachments, or raw RFC822 messages are explicitly out of scope and must route through SMTP. That is a sound constraint, but it means the package can no longer be the single mail path for a complex application.

Integration feasibility

  • Hard floor of PHP 8.3 and Laravel 13. Both are aggressive; Laravel 13 is very new, so the realistic addressable population is applications already on or actively planning an L13 upgrade. Everything else cannot adopt 4.0.0 at all.
  • The new withSymfonyMessage tag callback API is a migration, not a drop-in. Any code that sets tags through the old path will silently stop tagging (or fail) unless updated. Tag-based analytics and routing in DirectMail depend on this, so it is a reporting-integrity risk, not just a code change.
  • Explicit failure for BCC/attachments/raw/undisclosed recipients is the right call versus silent omission, but it converts previously "working" (if wrong) sends into runtime exceptions. Those will surface in production at send time if not caught by tests.

Technical risk

  • High near-term risk from the breaking matrix: PHP version, framework major, transport contract, and extension points all change in one release. This is a coordinated upgrade, not a version bump.
  • Validation is unit-level only: 16 tests / 49 assertions, outbound requests mocked, no live email sent against DirectMail. The regression suite is thin relative to the blast radius. Signature handling, Unicode tags, and alternative text/HTML parts are covered by mocks, which proves intent but not real-world interoperability.
  • Protected extension points changing means any in-house subclass of the transport (common for logging, tenant routing, or header injection) will break and must be rewritten against Symfony Mailer's contracts.
  • Failure modes are now explicit exceptions mid-send, which can abort a batch job partway through. Without a queued retry/dead-letter strategy this can look like data loss.

Key questions

  • Which of our applications are on PHP 8.3+ and Laravel 13 today, and what is the L13 upgrade timeline for the rest?
  • Do we currently rely on BCC, envelope-only recipients, attachments, or raw messages on any DirectMail-sending path? If yes, those paths need an SMTP fallback designed before upgrade.
  • Do we subclass or monkey-patch the transport, or register custom tag callbacks? Inventory of extension points is a prerequisite.
  • What is our confidence level given mocked-only validation — are we willing to canary with a real DirectMail account before broad rollout?
  • Is DirectMail still the right provider for us, or is this the moment to consolidate on SMTP/SES and drop the adapter entirely?

Integration Approach

Stack fit

  • Fits cleanly into a Laravel 13 / PHP 8.3+ service using the framework's Mail façade with a custom transport. No new infrastructure, no sidecar, no queue changes required for the happy path.
  • Does not fit multi-purpose mail usage. Applications mixing transactional sends with attachments or BCC must split into two mailers: DirectMail transport for eligible messages, SMTP for the rest. Laravel supports multiple mailers, so this is config-level but adds a routing decision to every send site.
  • Observability fit is neutral — the package does not add tracing, so existing mail logging must be preserved through the extension point rewrite.

Migration path

  • Read UPGRADING.md first; treat it as the authoritative checklist rather than inferring from release notes.
  • Inventory every send site that sets tags, subclasses the transport, or uses BCC/attachments/raw messages. This inventory determines whether the upgrade is a config change or a code project.
  • Port tag callbacks to withSymfonyMessage and re-verify tag propagation into DirectMail reporting before decommissioning the old path.
  • Add an SMTP mailer alongside and route ineligible messages there before flipping the DirectMail transport to 4.0.0 — otherwise explicit failures become production incidents.
  • Upgrade PHP and Laravel first, in a separate change, so version-floor failures are isolated from transport-contract failures.

Compatibility

  • No backward compatibility with 3.x. This is a clean cut; there is no dual-run mode.
  • Downstream: any package or internal library that inspects the transport or registers tag callbacks must be updated in lockstep. Composer constraints should be pinned to ^4.0 to prevent accidental 3.x resolution on older services.
  • Forward: Symfony Mailer 7.4/8 supports the current L13 window, so the package should stay viable through the next Laravel minor cycle — but a Laravel 14 bump will likely require another major here.

Sequencing

  1. Confirm PHP 8.3 / Laravel 13 readiness and schedule the framework upgrade as an independent workstream.
  2. Inventory extension points and ineligible mail features; design the two-mailer split.
  3. Upgrade a low-traffic internal service first (canary) with real DirectMail credentials and a live send test — this compensates for the mocked-only validation.
  4. Migrate tag callbacks and any transport subclasses; verify DirectMail-side reporting.
  5. Roll to remaining services; remove 3.x pins and dead SwiftMailer shims.

Operational Impact

Maintenance

  • Low steady-state maintenance: small dependency surface, single maintainer-style release cadence implied by PR #26, and the package now tracks upstream Symfony Mailer rather than a dead SwiftMailer branch.
  • Requires disciplined version pinning. Because the package sits on the mail critical path, an unpinned minor could alter delivery behavior silently; pin majors and review changelogs.
  • The narrowed feature set is a permanent documentation burden — every new engineer will try to attach a PDF and hit an exception. Runbook and code comments at the mailer config are mandatory.

Support

  • Support burden shifts to us, not the package. Silent-omission bugs are gone (good), replaced by loud failures that on-call must triage. Alerting on mail exceptions with a clear "use SMTP mailer for this message" hint in the log line is the single highest-value operational investment.
  • Vendor support is direct-to-DirectMail for delivery issues and community/GitHub for adapter issues; no commercial backing is evident. Acceptable for a thin transport, risky if it becomes a single point of failure for all outbound mail.

Scaling

  • Throughput is bounded by DirectMail's API and our HTTP client concurrency, not the package. Queued mail scales horizontally as usual.
  • Explicit failures scale badly in batch contexts: a job sending 10k messages that fails on message 4,000 leaves partial state. Use per-message jobs with retry and a dead-letter queue rather than batch loops.
  • The SMTP fallback path introduces a second provider quota and a second set of credentials to scale and monitor — modest but real added operational surface.

Failure modes

  • Hard failure at send time for BCC, envelope-only recipients, attachments, or raw messages. Symptom: exceptions in queue workers, not silent non-delivery. Detectable, but only after deploy.
  • Tag regression: mail sends but DirectMail analytics/tag-driven routing is wrong or empty. This is the most dangerous mode because it is silent and corrupts reporting rather than delivery.
  • Transport subclass breakage after the extension-point change: could surface as malformed requests, missing signatures, or auth failures depending on what was overridden.
  • Signature/Unicode handling is asserted only against mocks; a real-world encoding or signing mismatch would appear as provider-side 4xx rejections. Canary with live credentials mitigates.
  • Abandoned-dependency risk is reduced but not eliminated — the adapter still depends on one maintainer keeping pace with Symfony Mailer majors.

Ramp-up

  • Engineer ramp-up is low for basic wiring (config + mailer entry) and moderate for the upgrade: understanding Symfony Mailer contracts is required to port custom extension points.
  • Expect roughly a day for a simple service with no customization, and a multi-day project per service where subclasses, tags, or attachments exist.
  • TPM-level ramp-up: brief the team on the "DirectMail for simple, SMTP for everything else" rule before the upgrade lands, and require a live-send smoke test in the canary environment as a gate.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings