I think you're confusing the SAMAccountName and UserPrincipalName properties. If I remember correctly, the SAMAccountName is limited to 20 characters. The UPN can be up to 1024 characters usually look like user.domain.xxx.
Are you sure your SAMAccountName values have a domain name in them?
If you're changing the proxy addresses you should be working with the contents of the proxyAddresses property. You should also note that the PRIMARY SMTP address has the "SMTP" protocol in upper case. Secondary smtp addresses have the protocol expressed in lower case. Also, be aware there may be other protocols in the proxy addresses (the proxyAddresses property is a multivalued property). Depending on the age of your AD and Exchange organization you may find X400, FAX, X500, SIP, EUM, and others in there! Who knows . . . you may even find old MS (Microsoft Mail) and CCMAIL protocols lurking in there. :-)