I have installed Apache James to handle e-mails on my server. It works fine when I’m sending both through telnet and PHP’s native mail() function. The problem is that when I’m sending to a Gmail address, the mail will be marked as spam. When I send the EXACT same mail with the EXACT same headers with a PHP script on a web hosting service (one.com), the mail goes straight to the inbox. This is the reason why I think it’s not the headers or PHP that is the problem. And my IP address shouldn’t be in a blacklist, because I have never sent any mail from here before.
Anyone who think they know what can cause this kind of problem?