Skip to main content
Laravel Cloud hosts Laravel applications and manages Resend as an email resource. Connect a Resend account once for your organization, then attach email to any environment. Laravel Cloud creates a sending key and injects the mail variables your application needs.

What you get

  • OAuth connection to your Laravel Cloud organization.
  • Resource you can reuse across environments.
  • A sending key for each environment, injected as environment variables.
  • Billing that stays on your Resend plan.

Prerequisites

  • A Laravel Cloud organization with an environment.
  • A Resend account with a verified domain.

Connect your Resend account

Connect from the organization settings, or the first time you attach email to an environment. Either path sends you to Resend to approve access. Prefer a video walkthrough?
1

Open the canvas

Open the environment canvas and choose the Email resource.
2

Approve full access

On the Resend consent screen, pick the team Laravel Cloud should use and choose Full access. Laravel Cloud returns you to the same environment and imports the sending domains already on that team.
Full access lets Laravel Cloud import your existing domains and set up the webhooks it needs. Sending access can only send email, so Laravel Cloud can’t finish setup with that permission.
3

Connect a domain and create a key

Select a verified domain or create a new one. Click Continue.Enter the sender address and sender name, then choose a sending key.
  • Create a new key creates a full access key used by this environment.
  • Reuse existing key shares a key already used by another environment in the organization.
Confirm and attach email to finish.
4

Redeploy your application

For changes to take effect, redeploy your application.
Connecting and disconnecting requires the Edit organization integrations permission. See roles and permissions for more details.

Injected environment variables

MAIL_FROM_ADDRESS and MAIL_FROM_NAME use the sender you entered. Laravel Cloud encrypts RESEND_API_KEY and masks it, the same way it handles a database password. A custom environment variable with the same name takes priority over an injected one. Define the custom variable, then deploy. See Laravel Cloud’s environment variables documentation for how overrides work. To send from your own machine, copy these variables into your local .env. Laravel Cloud injects them into the hosted environment.

Send from your application

Laravel

Laravel ships with a Resend mail transport. The transport needs Resend’s PHP SDK. If the package is missing, Laravel Cloud prompts you to add it to the project’s dependencies:
Laravel reads the injected variables directly, so no further configuration is required. Send mail as you normally would:
The key has full access, so the same application can call the rest of the Resend API. Install resend/resend-laravel for the Laravel SDK, or send over SMTP.

Other frameworks

Laravel Cloud injects RESEND_API_KEY for every runtime. Read the key from the environment and pass it to the API or an SDK.
Queued mail can fail as a failed job. Laravel Nightwatch traces those jobs and alerts you when they start failing.

Attach Resend with the API

Attach Resend to an environment with a bearer token from the Laravel Cloud UI. from_address and from_name are required. Set key_strategy to create for a new key, or reuse and pass reuse_key_id to share a key another environment already uses. key_name is optional.
Deploy the environment after the request so the application receives the mail variables. The same API can list what you attach and change it later:

Next steps