External liblary class inside plugin controller
Is this some kind of namespace issue?


Yes.  If the class you're trying to instantiate is in a namespace, you'd need to indicate that:

$object = $rest = new \the\library\class\namespace\mail_delivery();


If it does not use namespaces, it's probably in the global namespace:

$object = $rest = new \mail_delivery();


If you do it like in your example:

$object = $rest = new mail_delivery();


Then PHP will assuming it's in the current file's namespace (Craft) and you'll get the error that you see.