And this makes sense -- the reason it failed was because it could not get DNS resolution, so it didn't know where to send the email.
As you have found, your solution is to either use the router as the DNS or to open port 53 from the printer to the internet. That is, of course, in addition to port 25.
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.