How to use Brave Free SMTP In Laravel Applications



Creating an account with Brevo and obtaining free SMTP details for a Laravel application involves a few simple steps. This guide will walk you through the process of setting up your Brevo account, retrieving SMTP details, and configuring them in your Laravel project’s .env file. We’ll also provide a Laravel-specific code example for sending an email, and conclude with a summary of the process.

Step 1: Creating a Brevo Account

  1. Visit the Brevo Website: Navigate to the official Brevo website.
  2. Sign Up: Find and click on the sign-up option, typically located in the top right corner of the homepage.
  3. Enter Your Details: Fill in your personal details such as name, email address, and create a password.
  4. Email Verification: Check your email inbox for a verification email from Brevo and click on the verification link.
  5. Log In: After verifying your email, log back into your Brevo account.

Step 2: Obtaining Free SMTP Details

  1. Access SMTP Settings: In your Brevo dashboard, locate the SMTP settings section.
  2. Enable SMTP Services: If required, request access to SMTP services and follow any additional instructions provided.
  3. Note SMTP Details: Once you have access, write down the SMTP details including server, port, username, and password.

Step 3: Configuring Laravel .env File

  1. Locate .env File: In your Laravel project directory, find the .env file.
  2. Edit .env File: Open the .env file in your preferred text editor.
  3. Update SMTP Details: Replace the existing SMTP details with the ones from Brevo:makefileCopy code

Ensure you replace YOUR_... with the actual details you obtained from Brevo.

Save the File: After updating, save the .env file.

Laravel Code Implementation

Here’s an example of how you can send an email in Laravel using the SMTP details:

use Illuminate\Support\Facades\Mail;

Mail::raw('This is a test email using Brevo SMTP.', function ($message) {
    $message->from('', 'Your Name');
    $message->subject('Test Email');


In this guide, we’ve outlined the steps to set up a Brevo account, obtain SMTP details, and configure them in a Laravel application. The provided Laravel code snippet demonstrates how to use these SMTP settings to send an email. Integrating Brevo’s SMTP service into your Laravel application is crucial for functionalities like sending notifications, verification emails, or any other email-based communication. By following these steps, you can effectively incorporate email services into your Laravel application using Brevo’s SMTP solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *