mam problem, otoz wrzucilem formularz na strone i po kliknieciu "wyslij" wyrzuca mi nastepujacy komunikat :
Kod
"
[b]Warning[/b]: Invalid argument supplied for foreach() in [b]/usr/php/pear/Mail.php[/b] on line [b]123[/b]
[b]Warning[/b]: Invalid argument supplied for foreach() in [b]/usr/php/pear/Mail.php[/b] on line [b]151[/b]
Failed to set sender: I [SMTP: Invalid response code received from server (code: 550, response: sender not found... podany nadawca nie istnieje...)]"
o co w tym chodzi ?
<?php
require_once "Mail.php";
$from = "formularz@xxxx";
$to = "xxxxxxx";
$subject = "Zapytanie ze strony www xxxx";
$body= '$_POST['imie']'.'$_POST['telefon']'.'$_POST['email']'.'$_POST['tresc']';
$host = "xxx.xxxx.xx";
$username = "xxx";
$password = "xxx";
$headers = array ('From' => $from, 'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp', 'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $body, $subject, $headers);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>"); } else {
echo("<p>Wiadomosc wyslana!</p>"); }
?>
a w HTML mam TAK:
<form ACTION="formularz.php" method="post">
<table border="0" width="100%" cellpadding="3" cellspacing="0"> <form action="" method="POST"> <input type="hidden" name="link" value="kontakt"> <input type="hidden" name="wyslij" value="1">
<font size="1" face="Arial,Helvetica,Times New Roman"> <input type="text" name="imie" class="form" size="19" value="Imię i nazwisko" onFocus="if(this.value=='Imię i nazwisko') this.value=''"> <font size="1" face="Arial,Helvetica,Times New Roman"> <input type="text" name="telefon" class="form" size="10" value="Telefon" onFocus="if(this.value=='Telefon') this.value=''">,
<input type="text" name="email" class="form" size="15" value="E-mail" onFocus="if(this.value=='E-mail') this.value=''"> <font size="1" face="Arial,Helvetica,Times New Roman"> <textarea name="tresc" class="form" rows="6" cols="59" onFocus="if(this.value=='Twoje zapytanie') this.value=''" style="font-size:12px">Twoje zapytanie
</textarea> <font size="1" face="Arial,Helvetica,Times New Roman"> <input type="submit" class="submit" value="Wyślij zapytanie">
a moze znacie jakis inny sposob na wyslanie wiadomosci ze strony bez uzycia klienta pocztowego ?
Ten post edytował erix 18.01.2009, 22:29:15
Powód edycji: bbcode