Undefined index: secret Error when sending email

Posted 10 months ago by brentxscholl

I'm trying to use Mailtrap to send an email but my app keeps thinking Im trying to use mandrill? I'm not sure why this is happening

The Error is: ErrorException (E_NOTICE) Undefined index: secret

According to the error this is the code that is causing the problem vendor\laravel\framework\src\Illuminate\Mail\TransportManager.php

protected function createMandrillDriver()
    {
        $config = $this->app['config']->get('services.mandrill', []);
 
        return new MandrillTransport(
            $this->guzzle($config), $config['secret'] // This line
        );
    }

Here is my controller that is is sending the file

if(Auth::user()->activated !== 1)
        {
            \Mail::to(Auth::user())->send(new Activate(Auth::user()));
            return redirect()->back();
        }

My config/mail.php file is the default from laravel

My .env file

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=83ff[...MY USERNAME...]aadf
MAIL_PASSWORD=bab[...MY PASSWORD...]8asdf
MAIL_ENCRYPTION=null

My config\services.php is also the default.

I did a search for the mention of Mandrill in my code and could not find anywhere where I'm stating mandrill.

Does anyone have any thoughts on what could be the issue?

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