Skip to content

Instantly share code, notes, and snippets.

@alexzhan
Created June 18, 2015 07:26
Show Gist options
  • Save alexzhan/65ea0b55f0e7067cb7a1 to your computer and use it in GitHub Desktop.
Save alexzhan/65ea0b55f0e7067cb7a1 to your computer and use it in GitHub Desktop.
get mail login address by email address
def get_login_addr(email):
main_addr = email.split('@')[-1]
if 'mail' in main_addr: return main_addr
else: return 'mail.' + main_addr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment