(I'm not at all an expert in server configuration, so the terms I'm using to describe my problem may be incorrect. Apologies in advance...)
I am running qmail on a server. When I send an email using the Windows Mail client from an individual account on this server (let's call it firstname.lastname@example.org) to my gmail account (email@example.com) the email goes right through to my inbox.
However, when I generate an email from a PHP program on the same server, and send it to the same gmail address, it gets classified as spam.
I have an SPF record on the server; don't have DKIM set up yet (will be doing that shortly).
But even so, I don't understand why GMail should interpret two emails from the same source differently.