First of all you need a real
dns name ( not a localhost ), because google com not provide a mail service delivery for localhost or some else domain without normally name, such as mymailserver.com, mail.myserver.com with MX
DNS record.
Next, you need check your ip in consist of spammer black list (PBL, XBL). This can check on spamhaus resource.
And the last, You need reconfigure your server for sending and delivery mail.