Comments (4)
Seems like there are multiple discrepancies between the API and V4 structs in the library. E.g. is_valid
is assumed to be present, but I can find no mention it in the docs for API V4.
Manual testing via curl also shows no is_valid
field:
$ curl --user 'api:***' -G \
https://api.mailgun.net/v4/address/validate \
--data-urlencode address='[email protected]'
{"address":"[email protected]","is_disposable_address":false,"is_role_address":false,"reason":["unknown_provider"],"result":"deliverable","risk":"medium"}
$ curl --user 'api:***' -G \
https://api.mailgun.net/v4/address/validate \
--data-urlencode address='foo@'
{"address":"foo@","is_disposable_address":false,"is_role_address":false,"reason":["malformed address; failed parse checks"],"result":"undeliverable","risk":"high"}
I would assume result
has superseeded is_valid
in the newer versions of API. Perhaps if the same result structure is used for both V3 and V4 in the library, IsValid
should be mapped according to result
and perhaps other fields.
from mailgun-go.
Yeah, I think in this library they want to ensure the backward compatibility between v3 and v4, so that's why it's used the same struct in v3 and v4
Mapping the result
values into is_valid
field would not solve the problem when we want to handle different logic based on the result values. Because is_valid
only contains true or false.
If we look at this PR #244, he just adds some new field in v4EmailValidationResp and EmailVerification struct
from mailgun-go.
@riskimidiw Let me know if I missed anything. #265
from mailgun-go.
@thrawn01 LGTM, Thank you for working on this issue 🙏🏻
from mailgun-go.
Related Issues (20)
- Remove dependancy on Chi
- Make fields public in struct `mailgun.Message`. HOT 3
- SetDeliveryTime Ignored HOT 1
- Change response for `VerifyDomain` method from (string, error) to (DomainResponse, error) HOT 2
- How to convert json stored messages to url.Values HOT 1
- Make properties on Message struct publicly accessible HOT 2
- VerifyAndReturnDomain is missing from the Mailgun interface
- Validate domain in mg.Send()
- Allow to use : in domain for testing HOT 2
- Inline image example should have img tag in html input HOT 1
- events.ClientInfo is missing the `bot` field HOT 2
- Add 'web_scheme' as a primary attribute to Domain HOT 3
- Set preferred reply method for mailing lists missing HOT 1
- [Feature Request] Add Send Time Optimization (STO) Feature HOT 3
- Ability to add multiple webhooks for same events.
- panic: runtime error: invalid memory address or nil pointer dereference On GetStoredAttachment
- GetMailingList returns empty struct even though address is present HOT 4
- SDK doesn't return errors for email send failures
- Remove dependency on github.com/go-chi/chi/v5 (again)
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 mailgun-go.