I'm trying to verify multiple email-adresses as once using briteverify.
我正在尝试使用briteverify验证多个电子邮件地址。
Their example request is:
他们的示例请求是:
https://bpi.briteverify.com/emails.json?address=johndoe@briteverify.com&apikey=XXX
It works great for a single adress, now I want to verify more than one mail in one request. Is there a way to do this?
它适用于单个地址,现在我想在一个请求中验证多个邮件。有没有办法做到这一点?
Im not a programmer by any means, so if its super easy - sorry. :/
我不是一个程序员,所以如果它超级容易 - 抱歉。 :/
1 个解决方案
#1
Put the addresses in the array and execute this little script
将地址放在数组中并执行这个小脚本
(function(){
var url = "https://bpi.briteverify.com/emails.json?apikey=XXX";
var emails = [
'johndoe@briteverify.com',
'johnsmith@briteverify.com',
'user@briteverify.com'
];
var success = function(data){
console.log(data.address + " is " + (data.valid?"valid":"invalid"));
};
var checkEmail = function(email){
$.ajax({
url: url,
data: {
address: email
},
success: success
});
};
for(var email in emails){
checkEmail(email);
}
})();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
#1
Put the addresses in the array and execute this little script
将地址放在数组中并执行这个小脚本
(function(){
var url = "https://bpi.briteverify.com/emails.json?apikey=XXX";
var emails = [
'johndoe@briteverify.com',
'johnsmith@briteverify.com',
'user@briteverify.com'
];
var success = function(data){
console.log(data.address + " is " + (data.valid?"valid":"invalid"));
};
var checkEmail = function(email){
$.ajax({
url: url,
data: {
address: email
},
success: success
});
};
for(var email in emails){
checkEmail(email);
}
})();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>