laravel-mailjet icon indicating copy to clipboard operation
laravel-mailjet copied to clipboard

User is not set.

Open pit07 opened this issue 3 years ago • 0 comments

Hi! I followed the guidelines, but i have this issue:

User is not set

image

In my .env file, i have only this variable:

MAIL_MAILER=mailjet
MAILJET_APIKEY= [my api key]
MAILJET_APISECRET= [my api secret key]
[email protected]
MAIL_FROM_NAME=NOUGATSSILVAIN

In my mail.php file:

'mailjet' => [
            'transport' => 'mailjet',
            'key' => env('MAILJET_APIKEY'),
            'secret' => env('MAILJET_APISECRET'),
            'transactional' => [
                'call' => true,
                'options' => [
                    'url' => 'api.mailjet.com',
                    'version' => 'v3.1',
                    'call' => true,
                    'secured' => true
                ]
            ],
        ],

In services.php :

'mailjet' => [
        'key' => env('MAILJET_APIKEY'),
        'secret' => env('MAILJET_APISECRET'),
    ]

And my route:

Route::get('/email', function() {

    $messageBody = "TEST MESSAGE BODY";
    Mail::raw($messageBody, function($message) {
        $message->to('[email protected]', 'TEST')
            ->subject('TEST');
        $message->from('[email protected]','My name');
    });
});

What i'm doing wrong? Thanks a lot! Vincent

pit07 avatar Oct 01 '22 10:10 pit07