Everything I've seen about this error code says it indicates the receiving mail box was unavailable at the time. There could be many reasons for this from their server being down, to the mailbox being full/non-existent, to more esoteric things. Do you get the message more often for any particular recipients, and have you asked them if they've had downtime, etc?
EDIT
Getting 550 5.7.1 apparently means that the message was rejected, due to the "submitter" (presumably your PHP script) not being authorized to send on behalf of the domain involved. There are no easy permalinks, but do an in-page search for "5.7.1" in RFC 4405 and RFC 4408. Another article I found says the message can indicate you being on a blacklist. While that's obviously not true since the messages do sometimes go through, it does suggest again that you're triggering some checking/spam mechanism, which would be consistent with the authorization concept in the RFCs. That should give you a bit more to work with for hunting this down.
But it seems like it might be time for you to go through support channels for the script you're using, unless it's some standard tool. I've never encountered that before.