<?php
include_once('funkcje.php');
$polaczenie=polacz("baza");
if (!$polaczenie)
{
}
$zapytanie=mssql_query("select * from Wiadomosci where id=".$_GET[id],$polaczenie);
$wynik=mssql_fetch_assoc($zapytanie);
if (isset($_POST['submit'])) {
$wynik2['data']=date('d-m-Y',$wynik2['data']); $wynik2['tytul'] = strtr($wynik2['tytul'], "xA5x8Cx8FxB9x9Cx9F","xA1xA6xACxB1xB6xBC"); $wynik2['skrot'] = strtr($wynik2['skrot'], "xA5x8Cx8FxB9x9Cx9F","xA1xA6xACxB1xB6xBC"); $wynik2['tresc'] = strtr($wynik2['tresc'], "xA5x8Cx8FxB9x9Cx9F","xA1xA6xACxB1xB6xBC");
$do = $_POST['email'];
$temat = 'Inormacja';
$tytul=$wynik['tytul'];
$tresc=$wynik['tresc'];
$email=$_POST['youremail'];
$headers = 'From: poczta@testowo.pl' . "r\n" .
'Reply-To: poczta@testowo.pl' . "r\n" .
mail($do, $temat, $tytul, $tresc);
}
?>
<html>
<script language="javascript" type="text/javascript">
function submitbutton() {
var form = document.frontendForm;
// do field validation
if (form.email.value == "" || form.youremail.value == "") {
alert( 'Wpisz poprawnie swój adres email oraz adres odbiorcy.' );
return false;
}
return true;
}
</script>
<form action="mail.php?id=
<?php echo $_GET['id']?>" method="post" name="frontendForm" onSubmit="return submitbutton();">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="2">
Wy¶lij znajomemu </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="130">
Adres e-mail znajomego: </td>
<td>
<input type="text" name="email" size="25" />
</td>
</tr>
<tr>
<td height="27">
Twoje imię i nazwisko: </td>
<td>
<input type="text" name="yourname" size="25" />
</td>
</tr>
<tr>
<td>
Twój e-mail: </td>
<td>
<input type="text" name="youremail" size="25" />
</td>
</tr>
<tr>
<td>
Temat wiadomo¶ci: </td>
<td>
<input type="text" name="temat" maxlength="100" size="40" />
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="submit" class="button" value="Wy¶lij e-mail" />
<input type="button" name="cancel" value="Anuluj" class="button" onclick="window.close();" />
</td>
</tr>
</table>
<?php
?>
<!--<input type="hidden" name="id" value="1554" />
<input type="hidden" name="8b2fcf7f298e6436ea8fb23430d4e418" value="1" />-->
</form>
</body>
</html>
jak robie wyslij pojawia sie tylko ze strona sieci web nie moze byc wyswietlona
lub
PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for adres-email@o2.pl in C:\Inetpub\Strona\mail.php on line 37
co robie zle ?
Ten post edytował bigart 11.07.2008, 10:05:02