Mailinglist sender selv
HejsaJeg får utilsigt sendt mail til min mailinglister, når søgemaskiner mv. rammer denne side. Hvis jeg bare åbner siden fra min editor, sender den mail - hvorfor!
<?php
session_start();
include("../login/sider.php");
if ($_SESSION['status'] == "login")
{
}
else
{
print(" <script language='javascript'>
location.href='../login/login.php';
</script>");
}
#########################################################
# MailingList #
#########################################################
# #
# Created by: Doni Ronquillo #
# #
# This script and all included functions, images, #
# and documentation are copyright 2003 #
# free-php.net (http://free-php.net) unless #
# otherwise stated in the module. #
# #
# Any copying, distribution, modification with #
# intent to distribute as new code will result #
# in immediate loss of your rights to use this #
# program as well as possible legal action. #
# #
#########################################################
require('http://www.xxxxxx.dk/MailingList/inc/config.php');
include('http://www.xxxxx.dk/MailingList/inc/header.php');
mysql_connect("mysql.xxxxx.dk", "xxxxx", "xxxxx");
mysql_select_db("xxxxxx");
?>
<TABLE BORDER=0 width=100%>
<TR><TD VALIGN=top>
<?
$sql2 = "select email from mail";
$res2 = mysql_query($sql2) or die("Couldn't get addresses.");
$headers = "From: \""."xxxxxx"."\" <"."no_reply@xxxxx.dk".">";
echo "qqqq";
// echo $message;
echo $HTTP_POST_VARS[message];
echo "1";
echo $HTTP_POST_VARS[subject];
echo "2";
while ($row = mysql_fetch_array($res2)) {
$email_addr = $row[0];
$subject = $HTTP_POST_VARS[subject];
$INSERTLINK = "true";
echo "bb";
echo $INSERTLINK;
echo "mm";
if ($INSERTLINK == "true") {
$fullmessage = $HTTP_POST_VARS[message] . "
-------------------------------------------------------
Unsubscribe Below
:: " . "http://www.xxxxx.dk/MailingList/" . "unsubscribe.php?email=" . $email_addr . "
-------------------------------------------------------";
} else {
$fullmessage = $HTTP_POST_VARS[message];
}
mail("$email_addr", "$subject", $fullmessage, $headers);
}
echo "<center>email sent!</center>";
?>
</tD></tR>
</TABLE>
<?
include('http://www.xxxxx.dk/MailingList/inc/footer.php');
?>
