Closed civil-dude closed 3 years ago
@civil-dude The README provides a detailed example, you need enable SMTP check when initialize a verifier:
var (
verifier = emailverifier.
NewVerifier().
EnableSMTPCheck()
)
func main() {
domain := "domain.org"
username := "username"
ret, err := verifier.CheckSMTP(domain, username)
if err != nil {
fmt.Println("check smtp failed: ", err)
return
}
fmt.Println("smtp validation result: ", ret)
}
what is meaning of disabled in smtp checking result. disable : {"host_exists":true,"full_inbox": false,"catch_all":true,"deliverable":false,"disabled":true}
what is meaning of disabled in smtp checking result. disable : {"host_exists":true,"full_inbox": false,"catch_all":true,"deliverable":false,"disabled":true}
https://github.com/AfterShip/email-verifier/blob/v1.3.0/smtp.go#L16
how can i check both smtp and verifier.Verify in one function?
just need to initialize verifier with EnableSMTPCheck()
once, maybe you can read examples from REAME and unit testes, it will help you a lot~
I need result like this format
{ "email": "tuyensinh@ued.udn.vn", "disposable": false, "reachable": "unknown", "role_account": false, "free": false, "syntax": { "username": "tuyensinh", "domain": "ued.udn.vn", "valid": true }, "has_mx_records": true, "smtp": { "host_exists": true, "full_inbox": false, "catch_all": true, "deliverable": false, "disabled": false }, "gravatar": null, "suggestion": "" }