3
Well I was able to get there on my own... Nothing really hit the spot in the modules... This code is used in conjuntion with a custom module (with a custom input form) that ends up dumping tracking data into a database for later charting (a bit more complex than the ones in the module repository now - nowever very business specific)...
Note: _xoops__groups_users_link.groupid = '4'" //The 4 is the group ID I am looking to send the mail to
So here it is:
mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS) or die("Unable to connect to host $server");
mysql_select_db(XOOPS_DB_NAME) or die("Unable to select database $db");
//----Get Email addys
$query = "SELECT _xoops__users.email FROM _xoops__users INNER JOIN _xoops__groups_users_link ON _xoops__groups_users_link.uid = _xoops__users.uid WHERE _xoops__groups_users_link.groupid = '4'";
$result = mysql_query($query);
$number = mysql_numrows($result);
for($x=$number; $x>0; $x--)
{
$myemail = $myemail . mysql_result($result, $x, "email").";";
?>
//Create your message here-------
$subject = "Your stuff here";
$from = (Xoops UID);
$message = "Your stuff here";
//Then send your message
if ($myemail != "")
mail($myemail, $subject, $message, $from);