# Specify a different mail theme for Notifications

{% hint style="info" %}
This issue was resolved in Laravel 8.5 <https://github.com/laravel/framework/issues/34391>
{% endhint %}

Views can use something called *Hints* to tell the framework where to look for the view file. The theme always uses a hint of `Mail::` which corresponds to the `resources/views/vendor/mail/html` folder. What if we want to locate our theme somewhere else?

We can define our own hint and bind it into the system in the `AppServiceProvider` with;

{% code title="app/Providers/AppServiceProvider.php" %}

```php
    public function boot()
    {
        $this->loadViewsFrom(resource_path('views/mail'), 'appmail');
    }

```

{% endcode %}

With this, we are saying that any view file that is hinted with `appmail::` is found in the `views/mail` folder.

Then, in the Notification, add the hint in the theme function;

```php
  public function toMail($notifiable)
  {
    return (new MailMessage)
      ->theme('appmail::mycorp')
      ->subject('Password Reset')
      ->line('Your password reset code is specified below')
      
    // etc
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://talltips.novate.co.uk/laravel/specify-a-different-mail-theme-for-notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
