Are you sure the problem is with gmail? I had some similar problems and the problem was that I wasn't specifying a SMTP server, after I did that it worked fine. See Thomas' response here (
http://lists.dorkzilla.org/archive/roundcube-dev/2005Nov/0814.html)
Hey,
I just noticed that emails sent from RoundCube seem to confuse Gmail.
It doesn't parse the headers correctly and so it can't tell who its from
or where the body begins and the headers stop. As well it doesn't
decode attachments and such.
This is probably a glitch with gmail, but its an issue that we should
resolve in roundcube. Not sure if this has already been resolved or
not, but I will try updating my install of roundcube and see if that
fixes the problem.
---
Mark Roy