Random Email (#97)

* add random email

* Update inbound_modal.html

* Update inbound_modal.html

* [bug] fix client nil for other types

Co-authored-by: Hossin Asaadi <hossin.asaadi@gmail.com>
This commit is contained in:
HassanArdeshir
2022-11-21 14:08:13 +03:30
committed by GitHub
parent 41cba886fd
commit f109991313
5 changed files with 112 additions and 5 deletions

View File

@@ -163,9 +163,17 @@
return email + (this.isClientEnable(email) == true ? ' Active' : ' Deactive')
},
getNewEmail(client) {
var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
var string = '';
var len = 6 + Math.floor(Math.random() * 5)
for(var ii=0; ii<len; ii++){
string += chars[Math.floor(Math.random() * chars.length)];
}
client.email = string + "@gmail.com"
}
},
});
</script>
{{end}}
{{end}}