Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver [mailjet] not supported #76

Open
gcjbr opened this issue Apr 17, 2024 · 0 comments
Open

Driver [mailjet] not supported #76

gcjbr opened this issue Apr 17, 2024 · 0 comments

Comments

@gcjbr
Copy link

gcjbr commented Apr 17, 2024

I'm trying to use Mailjet as a Laravel driver, meaning I'm trying to avoid invoking it's classes directly.

I did my best to follow the documentation, which is a bit ambivalent on this use, this is what I did:

My .env

MAIL_DRIVER=mailjet
MAILJET_APIKEY=MYKEY
MAILJET_APISECRET=MYSECRET
MAIL_FROM_ADDRESS=MYMAIL
MAIL_FROM_NAME=MYNAME

My services.php return array:


...

    'mailjet' => [
        'key' => env('MAILJET_APIKEY'),
        'secret' => env('MAILJET_APISECRET'),
        'transport' => 'mailjet',   // I tried both with and without this

    ],

...

Added Mailjet\LaravelMailjet\MailjetServiceProvider::class, to my providers array and 'Mailjet' => Mailjet\LaravelMailjet\Facades\Mailjet::class to my aliases.

And here's the class which is triggering the error:


<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class meuResetDeSenha extends Notification
{
    use Queueable;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($token)
    {
        $this->token = $token;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     */
    public function via($notifiable): array
    {
        return ['mailjet'];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     */
    public function toMail($notifiable): MailMessage
    {
        return (new MailMessage)
            ->subject('Redefina sua senha ')
            ->greeting('Olá!')
            ->line('Você está recebendo este e-mail porque nós recebemos uma requisição para sua conta.')
            ->action('REDEFINIR SENHA', route('password.reset', $this->token))
            ->line('Se você não requisitou uma redefinição de senha, nenhuma ação é necessária.')
            ->markdown('vendor.notifications.email');
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     */
    public function toArray($notifiable): array
    {
        return [
            //
        ];
    }
}


I can't use the solution here #58 since MailjetMailServiceProvider::class no longer exists.

@gcjbr gcjbr changed the title Expected response code "250/251/252" but got code "550", with message "550 5.7.1 Relaying denied". Driver [mailjet] not supported Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant