Email validation
How can I check given email is not a disposable email?
@golu7679 I will love to tackle this issue. Can you assign it to me?
@carrington-115 I dont have permission to assign the issue in any.
Hello @golu7679 You have few options to do that, and both of them require to download the CSV at the end of validation.
-
First option is to use the UI https://documentation.mailjet.com/hc/en-us/articles/1260803104410-Bulk-Validations.
-
The second option is using API and it requires more steps:
- Create contact list that will be used for validation, and store it's ID (
<Your contact list Id>), to use it on the next steps. Link to doc - In case contact for email is already created then use subscriptions Link to doc to link the existing contact with list.
Otherwise create Contacts via
managecontactaction Link to doc. Use Id<Your contact list Id>from previous step to link the contact with Contacts list directly on creation step. - Start verification job Link to doc, and store the ID for verification job (
<verification job id>) - Wait few minutes until verification is completed
- Get the verification results with https://dev.mailjet.com/email/reference/contacts/verifications/#v3_get_contactslist_list_ID_verify_job_ID
For some reason the Node.js example for verify action isn't precise, so you can use the next snippet to get the result
const result = await mailjet .get("contactslist", {'version': 'v3'}) .id(<Your contact list Id>) .action("verify") .id(<verification job id>) .request(); console.log(mjSubscription.body.Data[0]); - Use
ResponseUrlvalue from response object on previous step to get the downloading link for .CSV file with results.
- Create contact list that will be used for validation, and store it's ID (
-
open the CSV file and check the
is_disposable_addresscolumn to understand did email presented in a list of known disposable email addresses