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

packy's avatar
Level 7

Install MailGun with Forge

So I have Trap.io as my dev mail and on production I want to use Mailgun. My mail works fine on my development local sever but on my production I get "FatalThrowableError in TransportManager.php line 163: Class 'GuzzleHttp\Client' not found"

So far I have added it to my app using composer and can see it locally installed. When I pushup to Forge it runs composer but still gets the error. Do I have to include anything else????

Composer File:

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "intervention/image": "^2.3",
        "spatie/laravel-medialibrary": "^3.18",
        "zizaco/entrust": "5.2.x-dev"
    },

ENV file on Forge:

MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
[email protected]
MAIL_PASSWORD=XXXXXXXXXXXX
MAILGUN_DOMAIN=www.XXXXXXXXX.com
MAILGUN_SECRET=key-XXXXXXXXXXXXXXXXXX

Deploy Script:

cd /home/forge/default
git pull origin master
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force
0 likes
1 reply
willvincent's avatar

Are you sure you added it? I don't see guzzle in your composer.json shown there...

composer install --save guzzlehttp/guzzle
git add package.json
git commit -m "Add guzzle to package.json"
git push

Please or to participate in this conversation.