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

🐛 Bug Report: Variable not Working in Subject with SMTP Email Provider #4163

Open
2 tasks done
kaptinlin opened this issue Sep 18, 2023 · 3 comments
Open
2 tasks done
Labels

Comments

@kaptinlin
Copy link

📜 Description

When using the variable {{subscriber.lastName}} in the Subject line with the SMTP email provider, the variable is not getting replaced with the actual value. Instead, it only shows "Hello, " as the result.

  • The payload being used is:
{
  "subscriber": {
    "lastName": "John"
  }
}

👟 Reproduction steps

  1. Send an email using SMTP email provider with the subject as Hello, {{subscriber.lastName}}.
  2. Check the received email.

👍 Expected behavior

The subject of the email should be "Hello, John".

👎 Actual Behavior with Screenshots

The subject of the email is "Hello, ".

Novu version

0.19.0

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

When using the same variable {{subscriber.lastName}} in the Editor, it gets replaced properly and shows "Hello, John" as the result.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

@gitstart
Copy link
Contributor

@kaptinlin @jainpawan21 @scopsy we would like to pick this up

@mahendraHegde
Copy link
Contributor

the issue is with the name subscriber, its getting overwritten by one of the internal entities with the same name, if you name it subscriber1 or anything other than subscriber it should work fine, changing the logic to support exact message payload is recommended but required some careful code refactoring
@kaptinlin @scopsy @jainpawan21
i'd like to fix this as well

@ainouzgali
Copy link
Contributor

@mahendraHegde are you still interested in working on this?

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

Successfully merging a pull request may close this issue.

4 participants