parse-community / parse-community/parse-server-api-mail-adapter

Extra values are not present in callback payload

Open
#92 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
27
Forks
21
Avg merge
56m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sendMail(options) flow and the apiCallback({ payload, locale }) entry point, reproducing the issue with Parse.Cloud.sendEmail and an extra.testKey value. Trace how the payload is assembled and determine a consistent representation for the extra properties; done means those properties are available in the callback payload without changing existing fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.