Closed ColinFrick closed 1 year ago
This would be cool. I'd suggest that you have the following folder structure under the TMP dir:
emails/
default/
9dd63c26-5c18-4f9e-aa03-d414b05e529f/
html_body.html
text_body.txt
name.txt
default_subject.txt
from_email.txt
default_from_name.txt
3bd2a8c6-513f-4fc3-908f-7cb68e743893/
en/
de/
So the pattern is email/locale/template_id
and all the files needed to patch the email object are stored in that directory.
Because the localized templates are contained in the email object itself wouldn't it make more sense to structure the directory like this?
emails/
9dd63c26-5c18-4f9e-aa03-d414b05e529f/
name.txt
from_email.txt
default/
html_body.txt
text_body.txt
from_name.txt
subject.txt
af_NA/
html_body.txt
text_body.txt
from_name.txt
subject.txt
de/
Ah, good point. Makes sense.
There should be similar commands for working with email templates:
email:download
- Download all email templates to a directoryemail:upload
- Upload all email templates from a directoryemail:watch
- Watch a directory for changesHandling for HTML / Text templates and localization must be implemented.
For consideration:
email:test
- Send a test email through FusionAuth to the given email address