The way I see it is that you alias the import mail as mailer. You hope there are no other libraries called mail in your import path. PHP fixes that by requiring all libraries called mail to be dependent on their own namespace so that there will be no collisions.
I think that neither do make assumptions on how the code is called when used, only one is preventing name collisions.