Email Verification Function (email's integrity) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Email Verification Function (email's integrity) (
/showthread.php?tid=543328)
Email Verification Function (email's integrity) -
StaticYey - 26.10.2014
HAi,
I'm creating a new registration system for a new script that I am making in which at the proccess requires an e-mail address, (not some automatic "send code to verify" system for now), I just want to store my user's e-mail address in the database. I stuck at the part where I recieve the e-mail address and check whether to accept it or not.
I searched everywhere but I coundn't find anything for pawn so I come to you. Basically, what I need is a function in which I insert the protential e-mail address and it returns whether is a valid one (bohooo@malaka.com is valid, boh$@oo@zw@.com is not valid) or not.
Thanks in advance
Re: Email Verification Function (email's integrity) -
Abagail - 26.10.2014
Search for some things such as the @ symbol maybe?
For instance,
pawn Code:
if(strfind(params, "@", true) == 0)
{
// then it may be valid.
}
Re: Email Verification Function (email's integrity) -
StaticYey - 26.10.2014
Both "@sod.com" and "asds@sad@.com" would return true if I just used that, I was wondering if there was some plugin or something similar because if you were to make the code it's a damn project itself.
Re: Email Verification Function (email's integrity) -
Abagail - 26.10.2014
You can write a PHP script to verify using SMTP and then send HTTP requests within SA-MP.
Re: Email Verification Function (email's integrity) -
StaticYey - 26.10.2014
Found it! I am really sorry to waste your time people! Guess I aint a good searcher, here we go!
showthread.php?t=247893
'n it works from what I see. Anyone else who needs it, here it is.
Re: Email Verification Function (email's integrity) -
nemesis- - 26.10.2014
You're better off using known regex's to determine if the entered email address is valid before sending a test email to it.