Hello
I want to send e-mails rendered from templates that can be created / modifed by admin from a form (with placeholders).
I guess that we can write to the views files. But can't find a lesson on how to do it.
As for email templates themselves, they are no more than normal views except for the fact that you can't really reference external css and other resources. Everything has to be inline. And, in that vain, it is the norm to use tables for layouts etc.
HI Guys
Many thanks for your responds.
@RachidLaasri the fact is that it is not me who is going to edit the e-mails. it's an admin. And i want to make it as simple as possible. Just fill-up a form with body using an editor and save it to the corresponding view. if you have a tuto on that please share Salam :)
Mohammed
Unfortunately No, what i suggested is using the Laravel FileSystem to edit the view. Display the content of your view in an editor and replace the text with something like blade syntax.
Example :
Hi { { name } },
We are emailing you because { { reason } }...This will be the content of the message, you can insert HTML or anything you want.
Thank you. - { { sitename } }
Then replace these words with your variable that you will pass to the view while sending the email.