2 years ago

Laravel sending mail via mailtrap not working with no errors

Posted 2 years ago by TPDev

Attempting to send some dev testing emails from a Laravel Application. Followed this guide here:

made a account inbox, copied all its details to .env Everything works as in the video, however no email is sent or received in the mailbox Also when trying to log the email instead nothing is happening. No errors, nowhere.


public function build()
    return $this->markdown('emails.newuserwelcome');

Controller method:

public function email()
    Mail::to(Auth::user()->email)->send(new NewUserWelcome());
    return redirect ('/home');



Welcome to Application Name

Thanks for signing up. **We really appreciate** it. Let us _know if we can_ do more to please you!

@component('mail::button', ['url' => 'http://localhost:8000/home']) View My HomePage @endcomponent

Thanks, {{ config('') }} @endcomponent

This is my app\config\mail.php

'driver' => env('MAIL_DRIVER', 'smtp'), host' => env('MAIL_HOST', ''), 'port' => env('MAIL_PORT', 2525), 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), 'name' => env('MAIL_FROM_NAME', 'Example'), ], 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'sendmail' => '/usr/sbin/sendmail -bs', 'markdown' => [ 'theme' => 'default',

    'paths' => [

"pretend" => false

This is my .env:

MAIL_DRIVER=smtp MAIL_PORT=2525 MAIL_USERNAME=xxxxxxxxxxxxxxxxx MAIL_PASSWORD=xxxxxxxxxxxxxxxxx MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME=Example

I've tested this locally on a WAMP server And Remotely on Ubunto LAMP server same results (I.E nothing happening)

-Thanks for any help you can provide

Please sign in or create an account to participate in this conversation.