When sending mail over laravel, it will automatically append a gray "(c) 2019 Laravel. All rights reserved." on the bottom of the mail. Is there a way I can get rid of this? Here´s a picture of a sample mail: (created with php artisan make:mail SampleMail --markdown="mail.sample"
and calling it over my controller) - Received over mailtrap.io
Edit: This copyright notice is not included in the markdown template created by the make:mail
command.
This took me a while to figure out as well. I love Laravel, but the mail thing is sometimes a bit hard to follow with the layers to dive through.
First, publish your own folder so you can edit the mail message within your own app:
php artisan vendor:publish --tag=laravel-mail
Once done, in your views folder there will be a
vendor/mail
folder. This contains the files you can alter. There are a number of ways you can do this. When you create a new mailable, the top line is going to pull in the message blade file as a component:
@component('mail::message', ['header_url' => $header_url, 'header_title' => $header_title])
This file is in your mail folder (either HTML or Markdown depending on how you've created it). You can alter this permanently by changing the footer file it calls. I just skipped the footer file and changed the base message file since it was always coming from the same place, and to reduce the Laravel clutter. You can remove it here as well. Here's what I did to change it:
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ $companyName }}. All rights reserved.
@endcomponent
@endslot