Comments (6)
@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.
Thank you for reporting this. We will fix this in the next release.
from java-sparkpost.
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.
@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.
@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.
@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)
- Log4j critical vulnerability!! HOT 4
- SuppressionList update endpoints throw com.google.gson.JsonSyntaxException
- RestConnection does not honor Client base URL
- Upgrade to Log4J 2.17.1
- Webhook events no longer derive from AbstractWebhookEvent, making getting type more difficult
- Webhook fields initial_pixel and open_tracking are presented as int, rather than boolean in event classes, making deserialization harder
- GSON error when calling insertOrUpdate or insertOrUpdateBulk
- Add 'template_id' key in X-MSYS-API Custom Header
- SparkPost/Java
- Unable to use Java SDK to map the Webhook Event
- Support for EventsAPI
- Webhook active property missing from model HOT 2
- Webhook properties are out of date HOT 1
- attach pdf HOT 2
- Webhook resource is missing /validate endpoint
- SparkPost Java API Suppression list limitations HOT 1
- event webhook - handle ping events
- Message Event API ending point changed - please update HOT 1
- TransimisionBase should allow other types than String for Metadata value HOT 2
- Subaccount CRUDs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-sparkpost.