First, verify your email address. Use this code below
-(BOOL) NSStringIsValidEmail:(NSString *)checkString
{
NSString *stricterFilterString = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", stricterFilterString];
return [emailTest evaluateWithObject:checkString];
}
Pass your email string as an argument to the NSStringIsValidEmail: method. It will return YES if it is valid, NO otherwise.
source
share