עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה בקוד שליחת מייל בPHP

Featured Replies

פורסם

<?

require_once('recaptchalib.php');
$privatekey = ".......;
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again. <br /><a href='index.php?PageID=5'>[back]</a>" .
"(reCAPTCHA said: " . $resp->error . ")");
}


$to = "ilanfir@gmail.com";
$subject = "Inforall - someone wants attention..";
$from = $_POST["EMail"];
$name = $_POST["Name"];
$vsubject = $_POST["Subject"];
$vmessage = $_POST["Message"];


$message = "--------------------------\nName: ".$name."\nEmail: ".$from."\nSubject: ".$vsubject."\nMessage: \n".$vmessage."\n--------------------------\n";


$mail_sent = @mail( $to, $subject, $message);
echo $mail_sent ? "Message successfully sent!\n" : "Message delivery failed...\n";
echo "<br /><a href='index.php?PageID=5'>[back]</a>";
?>

יש לי את הקוד הזה, הוא שולח את המייל מעולה, רק ששוכח לשלוח גם את הנושא של המייל.. (זה שרשום בתוך ההודעה - vsubject)

אני משתגע כבר בנסיון להבין למה זה קורה כי קודם זה עבד לי מעולה... מצאתי את הבעיה.. השם של אחד משדות הטקסט שינה את השם שלו פתאום..

ועוד משהו שרציתי לדעת זה איך אני שולח טקסט מעוצב (אני רוצה שישלח לי טבלה שבה הנתונים ולא כמו שאתם רואים כאן, בין המקפים..)

מה שיוצא לי מהקוד הזה (מה שבעצם נשלח למייל שלי):


--------------------------
Name: שם השולח
Email: מייל של השולח
Subject: נושא, שבמקרה עכשיו לא רוצה לשלוח אותו
Message:
ההודעה עצמה
--------------------------

אשמח לקצת עזרה..

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.