Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jcq126's avatar

Illuminate\Support\Manager::createDriver() ERROR

Hey guys,

I've been having serious problems sending emails with Laravel 5 after moving from my vagrant box to my production server on DigitalOcean. Emails were sending perfectly in development but since moving to D.O. I am being thrown this error..

Missing argument 1 for Illuminate\Support\Manager::createDriver(), called in /var/www/html/kraken/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 89 and defined

I am using Mandrill and have all my mail data configured properly as it was sending fine on development. Does anyone know what can cause this error? All I have is a static page with a contact form that Laravel handles. Stuck on this for over 1 week now.

Thanks!

0 likes
6 replies
jcq126's avatar

Gone through that already unfortunately. Ive read through every search result i can find on this.

The problem isnt sending emails because I have that working on development, its having that new error thrown after deploying to digitalocean. Thanks for your response.

arabsight's avatar

I think it has to do with the mail driver not defined (maybe .env file not included).

the createDriver() method expects a $driver to be passed so it can create the appropriate mail driver: if $driver is mailgun the method will call an other method called createMailgunDriver(), so if the $driver is null it will call itself with no argument.

protected function createDriver($driver) {
    $method = 'create'.ucfirst($driver).'Driver';
    if (isset($this->customCreators[$driver])) {
        return $this->callCustomCreator($driver);
    } elseif (method_exists($this, $method)) {
        return $this->$method(); // if $driver in null this returns createDriver()
        // without a param, and that will throw the exception
        // Missing argument 1 for Illuminate\Support\Manager::createDriver()
    }
    throw new InvalidArgumentException("Driver [$driver] not supported.");
}

double check your mail driver config and .env (.env is ignored if you use git)

1 like
jcq126's avatar

Hmm thank you for the reply I appreciate it, I do have a .env file in the project with my variables correctly set and am using the mandrill API. When I cloned my project from my github account onto digitalocean I made sure to remake a .env since it was on gitignore. It's possible there is an issue with the variables actually being read, when I am home from work I will try var_dumping out my environment variables to test them.

fearis's avatar

Do you have config files in app.php?

$app->configure('mail');

$app->configure('services');

and have mail.php and services.php in config folder ?

azlanjamal's avatar

Hi, I solved this problem by adding this into .env

MAIL_DRIVER=smtp

Please or to participate in this conversation.