Only using the Groups module
The Group module is an upcoming alternative for the Organic Groups module for D7, for which right now there is only a beta version available.
Remark: the Groups, Communities and Co module (= GCC) is yet another alternative (with an official release for D7).
The Group module appears to be an interesting alternative, though it doesn't come with a lot (if any) documentation so far.
The best docu available, I think, is to read its sources. In doing so, I learned that its Group Invite submodule "Allows group members to invite people into their group", which will trigger appropriate eMails. Of course, that implies that the user who wants to send these invites, is already a group member. But this "function" is not really what you seem to be looking for (as per your additional comment to my answer here).
Instead, you want to "Send an email to group members of particular group when a new node is created". To do so, I'd narrow down your question to 3 sub-questions (= tasks), and try to implement this using the Rules module, as further detailed below ...
Also using the Rules module
Rules Event
That's easy, more or less out-of-the-Rule-box: When a new node is created.
Rules Condition
This is your Challenge 1: Only if "Node type of the created node belongs to some group".
Rules Action
Create a Rules "component" to send an eMail (anybody can do that, right?). Here is a typical sample of such component (in Rules export format, just import it in your own environment via copy-paste):
{ "rules_send_email_notification" : {
"LABEL" : "Send eMail notification",
"PLUGIN" : "action set",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"USES VARIABLES" : { "user_to_notify" : { "label" : "User to be notified", "type" : "user" } },
"ACTION SET" : [
{ "mail" : {
"to" : [ "user-to-notify:mail" ],
"subject" : "New node was added",
"message" : "New node was added for content type ...",
"from" : "[site:mail]",
"language" : [ "" ]
}
}
]
}
}
Obviously, the Subject and Content of the eMail may need review / tuning, while you might also want to use some other From eMail ID.
This is your Challenge 2: construct the "To" content of such eMail, i.e. all eMail IDs of all members of the group. That is what the value should be for user-to-notify:mail
in the Rules component shown above.
Write your custom Rule(s)
To address the above Challenges 1 and 2, you could write your custom module, in which you basically would do 2 things:
If you're looking for more Rules related coding samples, you may want to look at the Rules URL Argument module. Here is a quote about it (from its project page, bold markup added here):
... provides two rules conditions based on URL arguments:
- check if a URL argument is present.
- compare the value of an URL argument.
It also provides an action that makes the value of an URL argument available as new variable to Rules.
The newly provided Rules actions and conditions can be found under the "URL Argument" conditions and actions groups in the rule configuration interface.
For an example of how to use it, refer to Comment # 3 in issue # 1686360 which is about "Pass an amount to the url, ie; site/content/node-title?amount=10 or /node-title?=amount:10".