Alpha PNG as Texture with nodes -> isn't totally transparent
Everything is working as it's supposed to. Those black borders you see are simply shadows cast by the mug onto itself because you've made a hole in the side with the transparency shader. It's easier to see from the side:



It seems like you're trying to do something like this:



You don't need a transparency shader because you're not making anything transparent - you simply need to make the background of the image the same colour as the rest of the mug, so just use a MixRGB node and the alpha of the image as the Fac.

You'll notice I added a math node as well - that's just to control how much of the glossy is being mixed in, since if you used the alpha directly without the math node it'd be mixing 100% glossy and 0% diffuse.