Composer? Namespace? How to config use Mailin package?

Trying to use

See attachments, showing installed files and IDE highlighting for namespace.

phpStorm is trying to tell me something? The USE statement is grey but the actual usage (new) is not an error in the IDE.

But runtime error is Class ‘SendinBlue\Mailin’ not found

I am just guessing at a config:

        // SendinBlue

        'mailin' => [

            'class' => 'mailin-api\Sendinblue\Mailer',




… help! I do not have the Yii2/composer smarts to know where to look next…

Thank you

I just saw, mailin is not a Yii2 extension.

Your schould look at Working with Third-Party Code

You can easy use every code that is compatible with composer in you yii2 project.

It does not have to be yii2 extension.

As I can see you have already install it to vendor folder.

But php autoloading is CASE SENSETIVE.

And you should use correct namespace in ‘use’ declaration - (pay attention to ‘autoload’ declaration).

This should work (just change ‘SendinBlue’ to ‘Sendinblue’):

use Sendinblue\Mailin;


// somewhere in controller action

$mailin = new Mailin("","your access key");

@ mikezimin Perfect! Thank you so much.