feat: wire Resend mail and Cloudflare R2 storage (#4)
Add production provider deps/config so transactional email and CMS media can use Resend and a dedicated r2 disk with custom-domain URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Production transactional email uses Resend
|
||||
|
||||
The system SHALL support Resend as the production mail transport via Laravel's native `resend` mailer (SPEC §9.1, §15.4). The Resend API key MUST be read from `RESEND_API_KEY` through `config/services.php`. Production deployments MUST set `MAIL_MAILER=resend` when transactional email is enabled.
|
||||
|
||||
#### Scenario: Resend mailer is configured
|
||||
|
||||
- **WHEN** the application boots with valid configuration
|
||||
- **THEN** a `resend` mailer MUST exist in `config/mail.php`
|
||||
- **AND** `config('services.resend.key')` MUST resolve from `RESEND_API_KEY`
|
||||
|
||||
#### Scenario: Local development uses safe mail default
|
||||
|
||||
- **WHEN** `APP_ENV` is `local` and `MAIL_MAILER` is unset
|
||||
- **THEN** the default mailer MUST be `log`
|
||||
- **AND** no outbound email MUST be sent to external providers
|
||||
|
||||
#### Scenario: Tests do not call Resend
|
||||
|
||||
- **WHEN** the test suite runs
|
||||
- **THEN** `MAIL_MAILER` MUST be `array` (or tests MUST use `Mail::fake`)
|
||||
- **AND** no live HTTP request to Resend MUST occur during CI
|
||||
|
||||
### Requirement: Global from address is configurable
|
||||
|
||||
The system SHALL read the global sender address and name from `MAIL_FROM_ADDRESS` and `MAIL_FROM_NAME` (SPEC §15.4).
|
||||
|
||||
#### Scenario: From address applied to outbound mail
|
||||
|
||||
- **WHEN** the application sends mail through the configured mailer
|
||||
- **THEN** the message MUST use the configured from address and name
|
||||
Reference in New Issue
Block a user