If your goal from getting the mail login id (YID) is to store it in your database as an identifier of the user, it is wrong. For this you "should" use GUID and nothing else.
If that is not why you want it, please explain your needs and maybe we could come up with something.