Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to send email as html #40

Open
xmak opened this issue Mar 21, 2024 · 2 comments
Open

option to send email as html #40

xmak opened this issue Mar 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@xmak
Copy link

xmak commented Mar 21, 2024

Can you add an option to send emails as HTML when using the email provider? According to Strapi docs, you just need to set a "html" property instead of "text":

        await strapi.plugins['email'].services.email.send({
          to: recipient.email,
          from: config.from,
          subject: config.subject ? config.subject : 'New Contact Form Submission',
          html: message,
        })

It would be cool if this choice could be set up in some config file. Overriding the send() function for a small thing like this seems like an overkill.

@ethan-gallant ethan-gallant added the enhancement New feature or request label Mar 21, 2024
@cpaczek
Copy link
Member

cpaczek commented Mar 23, 2024

Wouldn't be too hard to add, would probably add a config option something like allowUnsafeHtmlAsMessage since there is a concern of malicious actors using their own HTML to make stuff like phishing emails. Not sure when I could get to this but if you make a PR I'd be happy to merge.

@cpaczek
Copy link
Member

cpaczek commented Mar 24, 2024

made a rough draft, gonna test it later but feel free to try it

#41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants