בשביל לשלוח דרך שרת WIN חייבים להוסיף את השורה (אחרי הרבה ניסויים):
ציטוט:
ini_set("sendmail_from","contact@ofri-jewelry.com");
|
הבעיה
שאני רוצה לראות את השם של השולח במייל שמגיע (בשדה from), מה שרואים כרגע זה
contact@ofri-jewelry.com.
ניסיתי להעזר במשתנה נוסף אבל המשתנה ini_set דורס את הקיים כנראה.
מה אפשר לעשות?
קובץ ה-PHP:
PHP קוד:
<?php
ini_set("sendmail_from","contact@ofri-jewelry.com");
//Check whether the submission is made
if(isset($_POST['hidSubmit'])){
//Declarate the necessary variables
$mail_to='contact@ofri-jewelry.com';
$mail_Name=$_POST['txtName'];
$mail_from=$_POST['txtEmailfrm'];
$mail_Sub=$_POST['txtSub'];
$mail_msg=$_POST['txtMsg'];
//Check for success/failure of delivery
if(mail($mail_to,$mail_Name,$mail_Sub,$mail_msg,"From:$mail_from/r/nReply-to:$mail_from"))
echo "<span class='textred'>E-mail has been sent successfully from $mail_from to $mail_to</span>";
else
echo "<span class='textred'>Failed to send the E-mail from $mail_from to $mail_to</span>";
}
?>
הדף הניסיוני כמו שהוא ברשת:
http://www.ofri-jewelry.com/contactphp.htm
תודה לעוזרים.