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

Tiskiel's avatar

No hint path defined for [mail]

Hi,

I receive this message when I send an email via my mailable class :

<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Queue\SerializesModels;
use Illuminate\Mail\Mailables\Envelope;

class TrialRegistrationConfirmation extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(
        public string $token,
        public string $url
    ) {}

    /**
     * Get the message envelope.
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Trial Registration Confirmation',
        );
    }

    /**
     * Get the message content definition.
     */
    public function content(): Content
    {
        return new Content(
            markdown: 'emails.trial.registration-confirmation',
            with: [
                'url' => $this->url,
            ],
        );
    }

    /**
     * Get the attachments for the message.
     */
    public function attachments(): array
    {
        return [];
    }
}

I have seen another post about this message, but it concerns using markdown instead of view. In my case, I use the correct attribute in my content function.

Here is my view in emails/trial/registration-confirmation :

<x-mail::message>
# Confirmer l'inscription

<x-mail::panel>
Bonjour,

Vous avez demandé à participer à notre programme d'essai gratuit. Pour confirmer votre inscription, veuillez cliquer sur le bouton ci-dessous :
<x-mail::button :color="'green'" :url="$url">
Confirmer l'inscription
</x-mail::button>
</x-mail::panel>

Merci,<br>
{{ config('app.name') }}
</x-mail::message>

Where I use it :

Mail::to($data->email)->send(new TrialRegistrationConfirmation($token, route('trial.update', ['token' => $token, 'society_name' => str($temporaryDbName)->replace('ga_temporary_', '')])));

Does anyone have any ideas?

0 likes
2 replies
MohamedTammam's avatar

You mention the path is mails/trial/registration-confirmation. However, in your code you write emails.trial.registration-confirmation.

Notice the difference between mails and emails.

Tiskiel's avatar

@MohamedTammam my bad, it's a mistake, it is emails/trial/registration-confirmation. I edit my post, thank you for pointing this out

Please or to participate in this conversation.