MailStatus API Service for checking whether an email is operative or not. Validate email ids in your databases. Overview Lleida.net MailStatus API allows you to consult the validity of an email address. The API URL is: http://checkmailstatus.com/api/v2/request To check the validity of an email address, follow the below steps: Regular Expression Check Address format validation DNS Check MX domain register validation Blacklisted Check It validates if the domain has activated the blacklist mode. Greylisted Check It validates if the domain has activated the greylist mode. SMTP Check It validates the user though an SMTP connection. Catch-all Check It validates if the domain has activated the catch-all mode. On the examples provided under this documentation symbol {:name} is used for the username and {:pass} for the password. All operations require the parameters below described: user Lleida.net user account name. password User password. request Optional checkemail. This is the name of the operation invoked. request_id Optional. We encourage its use, even though it is not compulsory. email This is the email address to validate. The request parameters can be encapsulated within an XML or JSON document and must follow the format specified in mailstatus.dtd (http://checkmailstatus.com/v2/mailstatus.dtd). XML Request format GET http://checkmailstatus.com/api/v2/request?xml={:mailstatus_xml} HTTP/1.1
POST http://checkmailstatus.com/api/v2/request HTTP/1.1 xml={:mailstatus_xml} Content-type: application/x-www-form-urlencoded JSON Request format GET http://checkmailstatus.com/api/v2/request?json={:mailstatus_json} HTTP/1.1 Accept: application/json POST http://checkmailstatus.com/api/v2/request HTTP/1.1 json={:mailstatus_json} Content-type: application/x-www-form-urlencoded Accept: application/json Parameters Request format An alternative is to send tuples as parameters key:value. GET http://checkmailstatus.com/api/v2/request?user={:name}&password={:pass}&... HTTP/1.1 Accept: application/json POST http://checkmailstatus.com/api/v2/request HTTP/1.1 user={:name}&password={:pass}&... Content-type: application/x-www-form-urlencoded Enjoy! Response formats All the operations receive an XML or JSON document as a response, being the root node the response element. This element contains several common elements to all the operations and that are always present, followed by other specific elements for the operation invoked. The common elements of the response element are the following: code The status code of every request.
status This is the description of the status code. request This is the name of the operation invoked. Requests are compliance with DTD mailstatus_response.dtd (http://checkmailstatus.com/v2/mailstatus_response.dtd) Status codes Status Description 200 Success 1400 Method not allowed 1401 Invalid request 1402 Invalid content 1403 No data found 1404 Invalid XML 1405 Invalid JSON 1500 Unknown error 1501 Timeout error 1502 Connection error Status Description Response codes
SMTP Description 111 Connection refused 250 Requested mail action okay, completed 251 User not local; will forward to forward-path 421 Timeout exceeded or service not available, closing transmission channel 442 The connection was dropped during the transmission. 450 Requested mail action not taken: mailbox unavailable 451 Requested action aborted: local error in processing 452 Requested action not taken: insufficient system storage 471 An error of your mail server 500 Syntax error, command unrecognised 501 Syntax error in parameters or arguments 503 Bad sequence of commands 510 Bad email address 512 The host server for recipient's domain name cannot be found 521 Domain does not accept mail [rfc1846] 550 Requested action not taken: mailbox unavailable 551 User not local; please try forward-path 552 Requested mail action aborted: exceeded storage allocation 553 Requested action not taken: mailbox name not allowed 554 This means that the transaction has failed. It's a permanent error. SMTP Description MailStatus Get email information.
GET http://checkmailstatus.com/api/v2/request HTTP/1.1 Parameters user Lleida.net user account name. password User password. request Optional checkemail. This is the name of the operation invoked. request_id Optional. We encourage its use, even though it is not compulsory. email This is the email address to validate. Example request GET http://checkmailstatus.com/api/v2/request?user={:name}&password={:pass}&email=foo@gmail.com Response <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE response SYSTEM "mailstatus_response.dtd"> <response> <request>checkemail</request> <code>200</code> <status>success</status> <email>foo@gmail.com</email> <valid/> <detail> <regexp>1</regexp> <dns> <domain>gmail.com</domain> <mx preference="30">alt3.gmail-smtp-in.l.google.com</mx> <mx preference="40">alt4.gmail-smtp-in.l.google.com</mx> <mx preference="5">gmail-smtp-in.l.google.com</mx> <mx preference="10">alt1.gmail-smtp-in.l.google.com</mx> <mx preference="20">alt2.gmail-smtp-in.l.google.com</mx> <mx preference="5">gmail-smtp-in.l.google.com</mx> <mx preference="10">alt1.gmail-smtp-in.l.google.com</mx> <mx preference="20">alt2.gmail-smtp-in.l.google.com</mx> <mx preference="30">alt3.gmail-smtp-in.l.google.com</mx> <mx preference="40">alt4.gmail-smtp-in.l.google.com</mx> <spf>v=spf1 redirect=_spf.google.com v=spf1 redirect=_spf.google.com</spf> </dns> <smtp>250</smtp> <blacklist>0</blacklist> <greylist>0</greylist> <catchall>0</catchall>
</detail> </response>