Location: PHPKode > scripts > Create Your Own Directory > cms/admin/DBMAD/mailman/index.php
<?php
//$where = "../../../";
//include "../../authheader.php";

if($block != true)
{
?>

<html>
<head>
<?php
$mesa = $_POST['mess'];
$subje = $_POST['subj'];
$mails = $_POST['mail'];
$firstgroup = $_POST['group'];
$fp = $_POST['groupc'];
$from = $_POST['from'];

?>

<!--style>
.cent{ font-family: san-serif; font-weight: 600; color: #ffffff; font-size: 17px; height: 22px;}
.cent:hover{TEXT-DECORATION: none; color: #000000;}
</style-->

<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->

</head>

<?php include 'header.txt'; ?>
<?php
$qq="select * from defaulttab";
	$rres = mysql_query($qq,$link);
	while($rrow =mysql_fetch_array($rres,MYSQL_ASSOC))
	{
	$umail=$rrow['mailid'];
	$userdomain=$rrow['userdomain'];
	}


$ref=$_SERVER[HTTP_REFERER];
$domain = strstr($ref,$userdomain);
if($from == "" || $from == null)
	$from = $umail;


?>


</td>
</tr>

<tr width=100%>
<td width=100% height=100% bgcolor="#0f7f0f">

<!-- inside second row -->
<table width=100% height=100%>
<tr width=100%>
<td width=20% valign=top  style="border: 1px white ridge;"  bgcolor="#efefef">

<!-- inside second row first col -->
<table width=100% bgcolor="#efefef">
<tr width=100%>
<td align=center>
<br>
<?php @include "groupbox.php" ?>

</td>
</tr>
</table>
<!-- inside second row first col end -->

</td>

<td width=60% valign=top  style="border: 1px white ridge; padding-left: 5px;" bgcolor=#efffef>

<!-- inside second row second col -->
<table width=50% valign=top align=center border=0>
<tr width=100% valign=top>
<td valign=top align=left>
<br>
<form name=message  action="<?php $PHP_SELF?>" method=post>

FROM : <input name=from value="<?php echo $from;?>" type=text><br><br>

Subject: <input name=subj value="<?php echo($subje); ?>" type=text size=40><br><br>

Message:<br>
<textarea name="mess"  rows=18 cols=47 wrap=physical><?php echo($mesa); ?></textarea>
<input type=hidden name=mail>
<input type=hidden name=group>
<div align=right><input type=submit value="Send Mail" onclick="submitForm()"></div>
</form>

<script language=javascript>
function submitForm()
{
var subject = document.message.subj.value;
var message = document.message.mess.value;
var group = document.groupform.group.value;

var tot = document.mailids.test.length;
var maildis = "";
for(i=0; i<tot; i++)
{
	if(document.mailids.test[i].selected == true)
	{
		var ssr = document.mailids.test[i].value;
		maildis = maildis+"||"+ssr;
		document.message.mail.value = maildis;
	}
}

document.message.group.value = group;
var maaa = document.message.mail.value;

document.message.submit();
}
</script>

</td>
</tr>
</table>
<!-- inside second row second col -->
</td>

<?php
//Second row third column
include "links.txt";
?>

</tr>
</table>
<!-- inside second row end -->
</td>
</tr>


<tr>
<td>

<?php

$tok = strtok($mails, " ||");
echo("<font color=ffffff>Mail sent to:</font>");

$message1 = str_replace("<br />", "\n", $mesa);
$message1 = str_replace("\\\\","",$message1);
$message1 = str_replace("\'","'",$message1);
$message1 = str_replace("\\\"","\"",$message1);
$message1 = nl2br($message1);

while ($tok)
{
	/* additional headers */
	/* To send HTML mail, you can set the Content-type header. */
	$headers1  = "MIME-Version: 1.0\r\n";
	$headers1 .= "Content-type: text/html; charset=iso-8859-1\r\n";
	$headers1 .= "To: ".$tok."\r\n";
	$headers1 .= "From: ".$from."\r\n";
	$headers1 .= "Reply-To: ".$from."\r\n";
	$headers1 .= "Cc: \r\n";

	echo("<font color=#FFD36D> $tok </font>");
      if($domain)
      {
	  if(mail($tok,$subje,$message1,$headers1))
	  {
	    echo("-<font color=green> Mail Sent Successfully </font>,");
	  }
	  else
	  {
		echo("- <font color=red>Mail Not Sent </font>,");
	  }
      }
	$tok = strtok("||");
}
?>
</td>
</tr>
</table>
</body>
</html>
<?php
}
?>
Return current item: Create Your Own Directory