Skip to content

Extra values are not present in callback payload #92

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions