🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #169590

Re: Sendformmail.php nie wysyła maili (po aktualizacji php na serwerze)

#169590
From: stas13111979
Date: Sun, 21 Feb 2016 11:08
70 lines
2986 bytes
W dniu środa, 22 lutego 2006 10:03:49 UTC-8 użytkownik Elmo Killer napisał:
> > wypełnij to
> >
> > mail($email,$subject,$body);
> 
> 
> DZIĘKI!!! działa! :-)

Mam identyczny problem ale po wypełnieniu dalej klapa. Albo coś pominąłem jeszcze w skrypcie.

<?

function error($error) {
?>
	<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-2">
	</head>
	<body>
	<? echo $error ?>
	</body>
	</html>
<?
	exit;
}

$email    = $_POST['email'];
$location = $_POST['location'];
$require  = $_POST['require'];

if($email == "") {
	$error = "Nie został podany adres na który ma być wysłany email z danymi z formularza.";
	error($error);
}

if($require != "") {
	$separator = ",";
	for($item = strtok($require,$separator);
		$item;
		$item = strtok($separator)) {
			$items[$item]++;
	}
}

while(list($key,$val) = each($HTTP_POST_VARS)) {
	if(($key != 'send') and ($key != 'email') and ($key != 'subject') and ($key != 'require') and ($key != 'location')) {
		if(gettype($items) == 'array') {
			reset($items);
			while(list($key2,$val2) = each($items)) {
				if(($key == $key2) and ($val == "")) {
					$error = "Nie zostało wypełnione pole $key.";
					error($error);					
				}
			}
		}
		$body .= "$key:\n$val\n\n";
	}
}


mail($email,$subject,$body,"From: Klient internetowy <formmail@pandp.home.pl>");

if($location == "") {
	$error = "Formularz został wysłany. Dziękujemy.";
	error($error);
} else {
	header("Location: $location");
}

?>
Technical Details
Message-ID: <2c6b9f7d-df83-45a6-a651-38541cf26d83@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.us.feeder.erje.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!y89no3077633qge.0!news-out.google.com!l1ni20468igd.0!nntp.google.com!hb3no7821406igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <dti7t3$5le$1@inews.gazeta.pl> <dti868$6re$1@nemesis.news.tpi.pl> <dti93u$bcs$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
X-Received: by 10.31.154.65 with SMTP id c62mr21654487vke.8.1456052937982;        Sun, 21 Feb 2016 03:08:57 -0800 (PST)
X-Received: by 10.50.136.163 with SMTP id qb3mr81833igb.7.1456052937949; Sun, 21 Feb 2016 03:08:57 -0800 (PST)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.us.feeder.erje.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!y89no3077633qge.0!news-out.google.com!l1ni20468igd.0!nntp.google.com!hb3no7821406igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.php
Date: Sun, 21 Feb 2016 03:08:57 -0800 (PST)
In-Reply-To: <dti93u$bcs$1@inews.gazeta.pl>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.254.224.57; posting-account=QvGtMgoAAADm9Yl3b2QoK8_vZ1fdI5sa
NNTP-Posting-Host: 94.254.224.57
References: <dti7t3$5le$1@inews.gazeta.pl> <dti868$6re$1@nemesis.news.tpi.pl> <dti93u$bcs$1@inews.gazeta.pl>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2c6b9f7d-df83-45a6-a651-38541cf26d83@googlegroups.com>
Subject: Re: Sendformmail.php nie wysyła maili (po
 aktualizacji php na serwerze)
From: stas13111979@gmail.com
Injection-Date: Sun, 21 Feb 2016 11:08:57 +0000
Lines: 76
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit