0

I'm trying to implement a "Sign Up" function for my website that allows people to sign up with their enterprise credentials.

I would love for it to be as easy as a textbox that they type their email address into without having to select a provider like "Outlook.com" or "Gmail" or "Salesforce"

Is there a way to sniff out the email provider by the address?

PSEUDO

bool isOutlook = outlookapi.doesaddressexist("joe@ibm.com")

Wesley
  • 5,381
  • 9
  • 42
  • 65

1 Answers1

0

If you just want to extract the domain name you can use regex and a formula field:

"\\@.*" // returns e.g. @ibm.com

EDIT

Another option is to use pattern matching in apex. In a second step create a new sObject called "Provider-Domain" add a Text field called "domain". Create an entry for each provider and build a new SOQL query like:

[SELECT Name FROM Provider_Domain__c WHERE Domian__c = :YOUR_EXTRACTED_DOMAIN]
  • I appreciate the response, but that wasn't the question. The domain != the provider. IBM.COM could be a mail address from many providers. – Wesley May 22 '14 at 19:36