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

Extra values are not present in callback payload #92

Open
4 tasks done
Mammut-Felix opened this issue Jan 29, 2024 · 2 comments
Open
4 tasks done

Extra values are not present in callback payload #92

Mammut-Felix opened this issue Jan 29, 2024 · 2 comments
Labels

Comments

@Mammut-Felix
Copy link

New Issue Checklist

Issue Description

When additional properties are defined in sendMail(options), they aren't present in the payload of the callback.

Steps to reproduce

Parse.Cloud.sendEmail({
      templateName: 'testTemplate',
      placeholders: {
        name: 'Test',
      },
      recipient: 'testmail@domain.com',
      extra: {
        testKey: 'testValue'
      }
})

Actual Outcome

config.emailAdapter = {
    module: 'parse-server-api-mail-adapter',
    options: {
      sender: '..',
      templates: { ... },
      apiCallback: async ({ payload, locale }) => {
        console.log(payload)
      })
  }
}

output:

{
  from: '...',
  to: '...',
  subject: 'Test\n',
  text: '...',
  html: '<html>\n' +
    '  <body>\n' +
    '    <p>Test</p>\n' +    
    '  </body>\n' +
    '</html>\n'
}

Expected Outcome

The properties set in extra should be present somehow.

Failing Test Case / Pull Request

Environment

  • API Mail Adapter version: 3.1.1
  • Parse Server version: 6.4.0

Logs

Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza
Copy link
Member

mtrezza commented Jan 31, 2024

Isn't there a test case for this?

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

No branches or pull requests

2 participants