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

Variables looked for in uppercase instead of specified format: SENDERNAME is not defined instead of senderName #124

Closed
alexphiev opened this issue Jun 15, 2023 · 5 comments

Comments

@alexphiev
Copy link

alexphiev commented Jun 15, 2023

Bug report

Describe the bug

I need to send my email template variables from the code with upper case even though the template mentions {{= variableName }} in this format.

Steps to reproduce the behavior

  1. Create a template with the{{= senderName }} variable in any text or in the subject
  2. Save and use it in the code with the variable sent as senderName with the method: strapi.plugins["email-designer"].services.email.sendTemplatedEmail()

Additional context

It seems to be happening only in PROD environment but not 100% sure.

@github-actions
Copy link

Thank you!! This is your first issue on this repo

@dzpincus
Copy link

I'm also experiencing this issue. Any resolution?

@creazy231
Copy link
Collaborator

Could you explain what do you mean by having to send variables in uppercase by giving us an example on how it works and on how it not works?

@dalton5
Copy link

dalton5 commented Jul 24, 2023

Yes I have the same issue. I investigated. It's due to htmltotext method. It uses the lib html to text and for H1 or H2 it puts by default uppercase. You need to remove this otherwise when we call a variable lowercase in a title it can't find it because the text version transforms in uppercase.

See below the description from htmltotext:
uppercase | true | heading | By default, headings (<h1>, <h2>, etc) are uppercased.Set this to false to leave headings as they are.

Please fix it because I have the same issue. Thanks,

@creazy231
Copy link
Collaborator

Since #128 was merged, could you try to clone the main branch of this repository into your plugins folder and configure the plugin to resolve to this folder instead of using the one you've installed already? Don't forget to run yarn / npm install inside the cloned folder.

Does this solve the issue?

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

No branches or pull requests

5 participants