I am facing some problem in customizing the default Laravel notification mail. By default the title and subject of the message gets repeated, I just want to remove the duplication so that the message part starts immediately
This command will publish the Markdown mail components to the resources/views/vendor/mail directory. The mail directory will contain a html and a markdown directory, each containing their respective representations of every available component. The components in the html directory are used to generate the HTML version of your email, and their counterparts in the markdown directory are used to generate the plain-text version. You are free to customize these components however you like.
You just need to edit the published files in resources/views/vendor/mail directory, and remove the parts you don't need. If you go to resources/views/vendor/mail/html I think you want to edit the message.blade.php file and remove the header section:
So you want the subject to both be the subject and be inside the mail body?
If not then all you need is this. No need to pass the $sub to markdown()
->subject($sub)
I believe that what you are seeing is just googles default preview. They will always render the title, and then x number of characters from the email body. My best bet to avoid this is to override the text version of the mail with a version without $sub, and hope that gmail will use this in their preview.
I think that somewhere - the title and subject of any mail sent is included again just before the actual body of the message starts that why Gmail is including it - otherwise the markdown template is rendering very properly as required
You are absolutely right Gmail will always render the title and then x number of characters and it should be but in default Laravel markdown if the subject is present it is repeated again - not in the message but in unread messages list of Gmail