As per your comments, you're trying to use Gmail server to deliver messages to oblivy.com
. Google will never allow that unless you're a registered and authenticated user. Servers that accept messages from anonymous parties for any destination are called open relays:
An open relay (sometimes called an insecure relay or a third-party
relay) is an SMTP e-mail server that allows third-party relay of
e-mail messages. By processing mail that is neither for nor from a
local user, an open relay makes it possible for an unscrupulous sender
to route large volumes of spam. In effect, the owner of the server --
who is typically unaware of the problem -- donates network and
computer resources to the sender's purpose. In addition to the
financial costs incurred when a spammer hijacks a server, an
organization may also suffer system crashes, equipment damage, and
loss of business.
They became a problem in the late 1990s and blacks lists of open relays were created, so mail server administrators could just reject any incoming mail from such servers.
Thus you need to create a Gmail account and provide its credentials when sending mail. Additionally, if you enable two-factor authentication you also need a dedicated application key to use here (instead of your regular password).
And to send email with authentication you need a full-fledged mail library that supports SMTP-AUTH (and possibly encryption). Good old mail()
doesn't.