SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/10/2014, 01:02 AM   #1
StaticYey
Little Clucker
 
Join Date: Feb 2011
Posts: 23
Reputation: 2
Default Email Verification Function (email's integrity)

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
StaticYey is offline   Reply With Quote
Old 26/10/2014, 01:17 AM   #2
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,133
Reputation: 445
Default Re: Email Verification Function (email's integrity)

Search for some things such as the @ symbol maybe?

For instance,

pawn Code:
if(strfind(params, "@", true) == 0)
{
     // then it may be valid.
}
Abagail is offline   Reply With Quote
Old 26/10/2014, 01:32 AM   #3
StaticYey
Little Clucker
 
Join Date: Feb 2011
Posts: 23
Reputation: 2
Default Re: Email Verification Function (email's integrity)

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.
StaticYey is offline   Reply With Quote
Old 26/10/2014, 01:40 AM   #4
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,133
Reputation: 445
Default Re: Email Verification Function (email's integrity)

You can write a PHP script to verify using SMTP and then send HTTP requests within SA-MP.
Abagail is offline   Reply With Quote
Old 26/10/2014, 01:50 AM   #5
StaticYey
Little Clucker
 
Join Date: Feb 2011
Posts: 23
Reputation: 2
Default Re: Email Verification Function (email's integrity)

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.
StaticYey is offline   Reply With Quote
Old 26/10/2014, 03:35 AM   #6
nemesis-
Huge Clucker
 
Join Date: Sep 2009
Location: USA
Posts: 231
Reputation: 65
Default Re: Email Verification Function (email's integrity)

You're better off using known regex's to determine if the entered email address is valid before sending a test email to it.
nemesis- is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP]Email Verification On Register TehSprit Scripting Help 5 22/03/2013 04:10 PM
Email chat on server? So you send a email to a forwarded email that send the message in the sa-mp server Frede Server Support 4 04/02/2013 06:06 PM
need help email jasonnw666 Help Archive 5 12/06/2010 01:45 PM


All times are GMT. The time now is 08:26 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.