קוד:
ini_set("SMTP", "smtp.gmail.com");
ini_set("sendmail_from","<לא ניתן לפרסם מיילים באופן פומבי>");
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = "הודעה חדשה מהאתר";
// Your email address. This is where the form information will be sent.
$emailadd = "<לא ניתן לפרסם מיילים באופן פומבי>";
// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';
// --------------------------Do not edit below this line--------------------------
$headers .= 'Content-type: text/html; charset=windows-1255' ;
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
Foreach ($_POST as $key => $value)
{
If ($req == '1')
{
If ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
If ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
For ($I = 1; $I <= $j; $I++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$space = ' ';
$body = "שם הלקוח: " . $_POST["name"] .$line. "שם החברה: " . $_POST["company"] . $line . "מס' טלפון: " . $_POST["cell"] .$line. "דואר אלקטרוני: " . $_POST["email_add"] ;
}
Mail( $emailadd, $subject, $body, 'From: '.$emailadd.'', $headers);
?>
תודה מראשWarning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 20sm754360ywh.11 in D:\hshome\sharelivetv\sharelive.tv\kenes\sendresults.php on line 51
מה שכן את שני השורות של הINI SET כתבתי כדי להגדיר את הSMTP כנראה שמשהו שם חסר לי