Roundcube SMTP Error (-1): Connection to server failed.

Can send email using Roundcube getting…

SMTP Error (-1): Connection to server failed.

Also when trying to view a message in the inbox in Roundcube roundcube/?_task=mail&_action=show&_uid=1&_mbox=INBOX the server returns a 500 error.

Can anyine advise how I fix / troubleshoot these issues?