I've got a web page with a form for a user to fill out (name, email address) and then some PHP code that will send an email to the private Google Group (education domain) using the {groupname}[email protected] method. I know this works when a person uses their email account normally and sends an email to this address. The user receives a response to confirm the request to join the group. The membership request then appears in the Google Groups Admin page for approval if the user confirms.

However, When using the web page form and PHP, the email does not come from the person who filled out the form but rather from the web server itself. It seems Google ignores this as the header information does not contain the email address of the person wishing to subscribe to the group. I use the entered email address as the sender with this line:

mail( $recipient, $subject, $body, "From: $sender" ) or die ("Mail could not be sent.");

But I'm guessing that even with the sender set to the email address entered in the form, the actual email header contains the webserver's email address. I verified this by writing a debug line in the PHP code to send the same email to my email address and I looked at the headers. In fact, Gmail does some processing of the headers to see if the sender name matches the headers and puts via next to the webserver's email address.

Does anyone know of another way of asking a user on a web page for their email address to request access to a Google group? Is this even possible? Can't find anything about it in the Google Admin pages.

1 Answer 1


I'll bet Google does that on purpose to prevent people from being signed up for groups that they don't want to join.

Your best option is probably create a mailto: link on your page to the appropriate join address. That way when the user clicks it it'll open their preferred email client with the message already addressed.1 Then they'll only need to hit "send".

You should probably also have your website point visitors to the Google Group page so that they can join manually.

Granted, both are extra steps that the user would need to go through and you may lose some people as a result, but like so much else this is all because spammers have ruined things for the rest of us.

1 Assuming the user has their mail client set up that way. I expect there's a significant population of people who don't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.