please take a look at this, and see if that can resolve anything for you? this is not a script problem, well not 100% anyhow. these templates that are used are scanned by robots on the mail servers, the templates have been deemed as spam-like. in your case it appears that your IP has been greylisted and might want to just try some persistance. if that doesnt work, you may want to contact google about having your IP's whitelisted. if you are on a shared environment, might be difficult if there is no managed control of whats going out on those servers.
you can also request a dedicated IP and set your mail and SPF on that dedicated ip while leaving your site on the shared environment IP. at any rate, would also send this information to your hosting service and see if they can assist as well.
Solution: When you see the Greylisted message that simply means
the system has not seen a message from your IP address with the
recipient and from address specified. Greylisting is simply a technique
of challenging mail servers to redeliver the mail. This technique
defeats many spammers since their software will often not reattempt
delivery of mail since it would become more costly for them to do so.
Legitimate mail servers should always reattempt delivery for at least a
day. So while mail may be delayed 5 minutes, this should not cause a
problem since its possible your mail server was down and you wouldn't
be able to read it anyhow. You can read more about greylisting at http://greylisting.org.
If you are testing our servers for relaying and receive this message,
we will relay mail for your domain. All of the relay testing is done
prior to the greylist checks. You can use our web-based SMTP check tool
to test your domain. It can be found at http://www.dnspark.com/support/tools/smtpcheck.php.
Regards,
DosDawg
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support