Skip to content

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

Closed

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

Activity

  1. added
    type: bug
    status: help wanted
    on Sep 26, 2016
  2. thinkingserious commented on Sep 26, 2016

    @thinkingserious
    Contributor

    Thanks for the heads up @ludovicofischer! I have added this to our backlog for a fix.

  3. added
    difficulty: easy
    on Oct 1, 2017
  4. ubaldop commented on Oct 2, 2017

    @ubaldop

    @thinkingserious may I try to solve this, please?

  5. mbernier commented on Oct 2, 2017

    @mbernier
    Contributor

    @p3trur0 yes, please!

  6. ubaldop commented on Oct 2, 2017

    @ubaldop

    @mbernier thank you! I'll start to work on it tonight.

  7. ubaldop commented on Oct 3, 2017

    @ubaldop

    @thinkingserious @mbernier I am trying to approach this issue, however I have problems in compiling my fork because of wrong packages. I see there is a pending PR about that (see #148). Should I wait that merge before starting on this?

  8. thinkingserious commented on Oct 4, 2017

    @thinkingserious
    Contributor

    Hi @p3trur0,

    It might be some time before we implement the new SDK. Could you share some details on what is happening in your case. Perhaps I can help troubleshoot as I am able to develop locally with this SDK.

  9. ubaldop commented on Oct 4, 2017

    @ubaldop

    @thinkingserious basically is happening what is described here. So I am not able to compile sendgrid-java source code because the package names are not working properly. Do you have any suggestion to overcome this error?

    Am I missing something?

    My idea was to fix them manually in my fork and, once the current fix is performed, revert to the original version of the not compiling files.

    Thank you!

  10. thinkingserious commented on Oct 20, 2017

    @thinkingserious
    Contributor

    Hi @p3trur0,

    Maybe the Docker build can help?

    If you make the changes in a PR, I can test them locally as well.

    With Best Regards,

    Elmer

  11. ubaldop commented on Oct 25, 2017

    @ubaldop

    @thinkingserious so is the Docker build aligned with package resolutions?

  12. megri commented on Sep 23, 2019

    @megri

    @thinkingserious Why was the issue closed? This still seems to be a problem.

  13. georgepapas-afterpay commented on Mar 4, 2020

    @georgepapas-afterpay

    This is still a problem in 4.4.1. I've tried to capture more details here
    #611

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

    difficulty: easystatus: help wantedtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions