If you encounter this kind of error SMTP error 535 Authentication Failed while sending an email from Roundcube Webmail, then you can check the following things.
The error that probably you’ll see:
SMTP error 535 authentication failed in roundcube SMTP Error (435): Authentication failed
Open this file main.inc.php:
and change this line:
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_user'] = '';
That’s it 😀