server says" authentication failed"

Typically, authentication fails if you do not have the correct port and security policy combination for your account.

Go to Menu > Tools > Accounts, and check you have one of the following:

SMTP
Port 587 = Force usage of SSL/TLS
Port 25 = Use SSL/TLS if available
Port 465 = Use SSL/TLS on special port (legacy)

IMAP
Port 993 = Use SSL/TLS on special port (legacy)
Port 143 = Use SSL/TLS if available

POP3
Port 995 = Use SSL/TLS on special port (legacy)
Port 110 = Use SSL/TLS if available

These are the correct combinations of port and security policy. The underlined ones are the best option for security if your server supports them. SMTP port 465 was reassigned and should no longer be used for SMTP, though many mail providers still recommend and use it.