內容簡介
SpoofMail 通過檢查電子郵件的結構、查找電子郵件的 MX-Records,並檢查該電子郵件是否來自臨時或虛擬電子郵件提供商來驗證電子郵件的有效性。
SpoofMail 提供了用於驗證電子郵件的異步 JavaScript 函数,如果可用,它也可以用作 jQuery 插件。(不需要 jQuery)
PHP 和 JavaScript 都提供了相應的函數。
提供的功能:
PHP
SpoofMail PHP 函数接受一個電子郵件和一個可選的回調函數。
函數還返回一個簡單的布爾值,表示通過或未通過驗證。
回調包含一個參數,其中包含一個失敗檢查的數組或 NULL(如果電子郵件通過了所有檢查)。
sm_verify_email( $email, $callback )
JavaScript
SpoofMail JavaScript 函数接受一個電子郵件和一個回調函數。
回調包含兩個參數。第一個參數是一個包含‘通過’或‘未通過’狀態和失敗檢查的數組的簡單對象。
第二個參數包含整個響應對象,大多數情況下可以忽略。
spoofMail(email, callback)
如果包括 jQuery,JavaScript 函数也可以作為 jQuery 函数使用。
$.spoofMail(email, callback)
開發者:PHP Hosting Experts CatN
外掛標籤
開發者團隊
原文外掛簡介
SpoofMail validates an email by checking the email’s structure, finding the email’s MX-Records and checking that the email has not been generated from a temporary or fake email provider.
SpoofMail provides an asyncronous javascript function for validating emails and can also be used as a jQuery plugin if jQuery is available. (jQuery is not required)
Functions exist for both PHP & JavaScript.
The functions provided:
PHP
The SpoofMail PHP function takes an email and an optional callback function.
The function also returns a simple Boolean for ‘pass’ or ‘fail’.
The callback contains one argument with an array of failed checks or NULL if the email passed all checks.
sm_verify_email( $email, $callback )
JavaScript
The SpoofMail JavaScript function takes an email and a callback function.
The callback contains two arguments. The first is a simple object containing the ‘pass’ or ‘fail’ status and an array of failed checks.
The second argument contains the entire response object and can mostly be ignored.
spoofMail(email, callback)
The JavaScript function is also available as a jQuery function if jQuery is included.
$.spoofMail(email, callback)
Developed by PHP Hosting Experts CatN
