Giter Club home page Giter Club logo

Comments (6)

yepher avatar yepher commented on September 19, 2024 1

@pinaf, Awesome glad this is not holding you up. I think the code should handle the full spec so yes I think I will add it but I will make it a little lower priority now.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

Thank you for reporting this. We will fix this in the next release.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

@pinaf

I ran RetrieveAllTemplatesSample and it worked. But looking at the From spec it says Address “from” : "[email protected]" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "[email protected]" } used to compose the email’s “From” header

So yes the code needs to be smarter when parsing that template response. Currently it assumes it is the object form of the from address.

Can you tell me how you created that template so I can make sure I run and test your specific use-case?

Can you provide the JSON that is returned for the template that is failing? You can sanitize it by replacing your domain names with "example.com" and substitute strings for any other personal/confidential information.

Thanks.

from java-sparkpost.

pinaf avatar pinaf commented on September 19, 2024

@yepher so it seems that this might be an issue with the template being "old". Some of them return

"from": {
        "name": "--redacted--",
        "email": "--redacted--"
      },

But others return

"from": "name <email>",

from java-sparkpost.

pinaf avatar pinaf commented on September 19, 2024

@yepher interesting. If I take one of the templates that return from as a string and click save & publish without changing anything, upon a subsequent API call I get a json for from

from java-sparkpost.

pinaf avatar pinaf commented on September 19, 2024

@yepher I just confirmed that solves my problem (just re-publishing the templates). It's up to you whether you want the smarter parser or not :)

from java-sparkpost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.