Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Catch user-misspelled email addresses.
branch: master

Merge pull request #1 from Pretz/master

Switch to NSInteger rather than `int` to fix Xcode compiler warnings
latest commit da1f031785
Derrick Ko derrickko authored

Mailcheck - Objective-C

The Objective-C library that suggests a right domain when your users misspell it in an email address. See the original at

When your user types in "user@hotnail.con", Mailcheck will suggest "".

Mailcheck will offer up suggestions for top level domains too, and suggest ".com" when a user types in "user@hotmail.cmo".


Copy mailcheck.h and mailcheck.m from the Mailcheck folder to your project.

#import "Mailcheck.h"
NSDictionary *result = [Mailcheck suggest:@""]

Result will contain nil if the domain appears to be valid. Otherwise the suggestion will be a dictionary like this:

{@"address": @"test",
 @"domain":  @"",
 @"full":    @""}

New in 0.2

Now includes a check if the email is valid thanks to

#import "Mailcheck.h"
NSDictionary *result = [Mailcheck check:@""]

Result will contain keys for "valid" and "suggestion"

{@"valid": @(YES),
 @"suggestion": {@"address": @"test",
                 @"domain":  @"",
                 @"full":    @""}}

Supply your own domain lists:

NSDictionary *result = [Mailcheck check:@"" domains:@[@""] topLevelDomains:@[@"co"]];

Or add to the default list:

NSDictionary *result = [Mailcheck check:@"" extraDomains:@[@""] extraTopLevelDomains:@[@"co"]];

Check the MailcheckDemo or the GHUnit tests in TestMailcheck.m for more usage examples. You can run the tests by loading the demo project and selecting the Tests scheme.



Licensed under the MIT License.

Something went wrong with that request. Please try again.