Skip to content

Setting sandbox mode to false generates invalid request when sending mail #147

@ludofischer

Description

@ludofischer

Issue Summary

Setting the sandbox mode to false triggers this error: https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.mail_settings.sandbox_mode.enable because it generates an empty object for sandbox_mode key in the API request body,

Steps to Reproduce

  1. Create a new MailSettings and call setSandboxMode on a Setting with enabled
  2. Set the MailSettings on your new Mail
  3. Send the email

You can reproduce the problem by modifying one of the tests like this: https://github.com/ludovicofischer/sendgrid-java/commit/4987e9f06d535690459d3e939098d6b246e1f7fe

Technical details:

  • sendgrid-java Version: master (latest commit: [9d14b95])
  • Java Version: 1.8

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