-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you expose method to get domain name from email address #766
Labels
enhancement
New feature or request
Comments
That's effectively just this: int at = mailbox.Address.LastIndexOf ('@');
var domain = mailbox.Address.Substring (at + 1); |
jstedfast
added a commit
that referenced
this issue
Feb 14, 2022
Not really, for this input this would not work: |
MailboxAddress.Address does not include the name. It only includes the |
This is what you'd do: var mailbox = MailboxAddress.Parse ("\"Mr Valid\" <[email protected]>");
int at = mailbox.Address.LastIndexOf ('@');
var domain = mailbox.Address.Substring (at + 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please expose method, which would extract domain name from email address. Eg:
[email protected] would return contoso.com
The text was updated successfully, but these errors were encountered: