Laravel Mailables

Posted 11 months ago by sktklaus

If I use this

        Mail::send('emails.jobapplication', $data, function($message) use ($data){
            $message->from('[email protected]');
            $message->to('[email protected]');
            $message->subject($data['name']);
        });

It works but I can't use the mail component

@component('mail::message')
# Introduction

Video Notification Email.
{{$username}}

@component('mail::button', ['url' => ''])
Button Text
@endcomponent

Thanks,<br>
{{ config('app.name') }}
@endcomponent

If I sent with ``` Mail::to('[email protected]')->send(new VideoNotification());

It uses the component, but I can't pass my data, 
How do I fix it?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.