Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got google apps setup, with the mx records working. Any emails to now go to my google apps, great.

Now i want to use google apps for sending automated emails (ie lost password, registration)

How do i set it up so that php's mail() using googleapps?

is this correct?

also, is there anyway for test (sending myself multiple emails) without google thinking im spamming?

share|improve this question

2 Answers 2

There's a couple of limitations to Google's Standard (free) Edition (I'm assuming that's what you're using) that you should be aware of:

You can only send to 500 external recipients daily:

I can't verify this, but I've read (somewhere) that the number of invalid/undeliverable addresses you attempt to send to can trigger a suspension, so I'd recommend verifying the email accounts at sign-up if you're not already doing so.

Finally make sure you have SPF records setup for your domain.

Also PHPMailer (it's 3rd-party) is fine, but you may prefer SwiftMailer instead; I've been using it exclusively now as I find it a bit cleaner/OOP friendly:

share|improve this answer
thanks for the tips, what are SPF records? – haroldo Mar 18 '10 at 14:28
Sender Policy Framework (SPF) records are increasingly being adopted to evaluate (partially or entirely) whether or not a host is permitted to send mail for a particular domain. In your case, your SPF records for would include a line that includes google's mail servers as being allowed to send mail. If you hit up your Google Apps help section, I believe there's an FAQ entry that tells you what to put in your SPF records. – gravyface Mar 18 '10 at 20:59

It is perfectly possible to send out automated messages using phpmailer, but be aware that Google's tolerance may be lower than the 500-recipient limit mentioned by Gravyface. I have been using a "noreply" account to send out opt-in notifications from a web application and today I discovered that this account was suspended for abuse.

I'm pretty sure I wasn't sending out spam or hitting the daily 500 (or even 100) message/recipient limits, so be aware that Google Apps can be employing additional checks for detecting "abusive" accounts.

Addendum: I contacted the support and they re-enabled my account within the time between my original answer and this edit (w00t, Google!). Apparently, their abuse detection mechanisms are having the twitchy-trigger-fingers, but they are aware of the issue.

share|improve this answer
Where do you contact google support? – user80666 Feb 27 '12 at 20:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.