[PHP SDK]
Laravel
Send mail from Laravel controllers, jobs, and notifications using the PHP SDK.
Step 1
Install the package
Add the official PHP client to your Laravel project.
bash
composer require reloop/reloop-emailStep 2
Set your API key
Create a free Reloop account, copy your API key, and add it to your Laravel environment.
Get an API key free →bash
RELOOP_API_KEY="re_xxxxxxxx"Step 3
Send email from Laravel
Use this Laravel snippet to send your first message. Works with Controllers · Jobs · Queues.
send_email.php
1<?php2
3use Reloop\Reloop;4use Illuminate\Http\Request;5
6class MailController7{8 public function send(Request $request)9 {10 $reloop = Reloop::client(env('RELOOP_API_KEY'));11
12 $email = $reloop->emails->send([13 'from' => 'Acme <onboarding@yourdomain.com>',14 'to' => [$request->input('to')],15 'subject' => 'Hello from Laravel',16 'html' => '<strong>It works!</strong>',17 ]);18
19 return response()->json(['id' => $email->id]);20 }21}Next steps
Examples, docs, and API reference
Go deeper with working code and the full API for PHP.
Other frameworks
Same API, framework-specific examples.
Send with Laravel.
Get an API key and ship transactional email from Laravel using the official PHP SDK.