If it isn't the printers hostname then it must be the SMTP server hostname, check that it is valid, and if it is, look to your time(has to be within 3 minutes) and DNS (Try 188.8.131.52) or switch the ther SMTP servers IP address instead.
By setting the hostname to something valid in the DNS settings, same will go for domain name (use WORKGROUP.local if you don't have one)
I have been normally using the email function to scan documents to myself, but recently it hasn't been working. When I try to email the scanned document to myself it is giving me an error stating "invalid hostname". How can I go about resolving this issue? Thanks