Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock IsValidEmail(const email[]) //controllo E-Mail.
- {
- new Provider[20], at_pos = strfind(email, "@", true) + 1;
- if(email[0] == '@' || at_pos == -1)
- {
- return false;
- }
- strmid(Provider, email, at_pos, strlen(email));
- static const providers[][] = //Provider Email validi.
- {
- "hotmail.com",
- "hotmail.it",
- "live.com",
- "live.it",
- "outlook.com",
- "outlook.it",
- "libero.it",
- "gmail.com",
- "yahoo.com",
- "virgilio.it",
- "email.it",
- "protonmail.com",
- "protonmail.ch"
- };
- for(new i = 0; i < sizeof(providers); i ++)
- {
- if(!strcmp(Provider, providers[i], true))
- {
- return true;
- }
- else continue;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement