Roundcube sends e-mails without subject

Solution 1:

I have found the solution to my own question.

Below are the lines 507-513 from program/steps/mail/sendmail.inc.

// encoding subject header with mb_encode provides better results with asian characters
if (function_exists('mb_encode_mimeheader')) {
    mb_internal_encoding($message_charset);
    $headers['Subject'] = mb_encode_mimeheader($headers['Subject'],
        $message_charset, 'Q', "\r\n", 8);
    mb_internal_encoding(RCUBE_CHARSET);
}

This is one of the two places that mentions $headers['Subject'] variable. The other one is line 196 which sets the variable.

Since neither me nor my clients have nothing to do with asian characters, I decided to comment this code block out and see what happens, and voila! Subjects started working. It seems roundcube has a weird bug. I hope this will help someone someday.