I'm sorry if this has been asked but I'm not quite sure how to search for it. I'm having a bit of trouble understanding how
mail() works in PHP. The way I see it, using that function, I can send e-mails from any user on my mail server - existent or not, without needing any credentials or anything. I doubt the guys from PHP would let this be the way I think it is and I also suspect that this has something to do with the fact that e-mails I send from my mail server go straight into the spam folders on other mailing services (gmail, yahoo etc.)
Can somebody shed some light on me and fill the missing link. Thanks!