problem s funkci MAIL v php

9 příspěvků

Archiv diskusního fóra

Fórum je uzavřené a slouží pouze ke čtení. Některé informace mohou být zastaralé.

  1. Mam problem s funkci MAIL v php neodesilaji se mi e-maily a do schranky na WZ my prisel mail s predmetem "Undelivered Mail Returned to Sender" kdyz kliknu ze ho chci cist obevi se prazdna stranka ! Nevim co s tim !
  2. pockej, sezenu si tu kristalovou kouli...
  3. Můžeš sem napsat víc informací? Třeba jak vypadá odesílaný e-mail?
  4. jasne hodim sem zdroj : soubor : mail.php ------------------------------------------------------------------------------------------------ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <title>mail</title> </head> <body style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 153);" alink="#ff6666" link="#ff0000" vlink="#c0c0c0"> <form style="margin-left: 280px;" target="_self" method="post" action="odeslat.php" name="mail">Nutno vyplnit vsechny pole formulare<br> <br> <span style="font-weight: bold;"> Odesílatel:<br>  </span><input maxlength="50" size="30" name="od"><br> <br> <span style="font-weight: bold;"> Prijemce:<br> </span> <input maxlength="50" size="30" name="prij"><br> <br> <span style="font-weight: bold;"> Predmet:<br> </span> <input maxlength="30" size="30" name="pred"><br> <span style="font-weight: bold;"><br> Text E-mailu :</span><br> <textarea class="textarea" name="text" cols="40" rows="8"></textarea><br> <br> <input name="Odeslat" value="Odeslat" type="submit">     <input name="reset" value="Vymazat hodnoty formulare" type="reset"><br> </form> </body> soubor odeslat.php ------------------------------------------------------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <title>mail</title> </head> <body style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 153);" alink="#ff6666" link="#ff0000" vlink="#c0c0c0"> <form style="margin-left: 280px;" target="_self" method="post" action="odeslat.php" name="mail">Nutno vyplnit vsechny pole formulare<br> <br> <span style="font-weight: bold;"> Odesílatel:<br>  </span><input maxlength="50" size="30" name="od"><br> <br> <span style="font-weight: bold;"> Prijemce:<br> </span> <input maxlength="50" size="30" name="prij"><br> <br> <span style="font-weight: bold;"> Predmet:<br> </span> <input maxlength="30" size="30" name="pred"><br> <span style="font-weight: bold;"><br> Text E-mailu :</span><br> <textarea class="textarea" name="text" cols="40" rows="8"></textarea><br> <br> <input name="Odeslat" value="Odeslat" type="submit">     <input name="reset" value="Vymazat hodnoty formulare" type="reset"><br> </form> </body>
  5. Ehm, neudělal jsi přikopírování někde chybu? Oba soubory jsou stejné... A nevidím tu funkci mail(). ;-)
  6. tak to jsi sem hodil jeden soubor dvakrat. cekal bych, ze v odeslat.php (jelikoz je to skript na zpracovani dat z formulare a odeslani mailu) bude neco na zpusob :: <?php $to = (get_magic_quotes_gpc ? "$_POST[prij]" : addslashes($_POST['prij'])); $from = (get_magic_quotes_gpc ? "$_POST[od]" : addslashes($_POST['od'])); $subject = (get_magic_quotes_gpc ? "$_POST[pred]" : addslashes($_POST['pred'])); $message = (get_magic_quotes_gpc ? "$_POST[text]" : addslashes($_POST['text'])); $additional_headers = "From: $from\n"; $result = @mail($to, $subject, $message, $additional_headers); echo ($result) ? "Mail byl uspesne odeslan." : "Chyba pri odesilani e-mailu."; ?>
  7. Zas tak slozity sem to nemel ten soubor vypada takhle : <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <meta content="text/html; charset=ISO-8859-2" http-equiv="content-type"> <title>odeslani</title> </head> <body style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 153);" alink="#ff6666" link="#ff0000" vlink="#cc0000"> <div style="text-align: center;"><big><big><span style="font-weight: bold;"> <?php //Definice promenych $prijemce = ($_POST["prij"]); $odesilatel = ($_POST["od"]); $predmet = ($_POST["pred"]); $text = ($_POST["text"]); //odeslani mailu if (mail ("$prijemce", "$predmet", "$text", "From: $odesilatel\r\n")); else { echo "Nepodarilo se e-mail odeslat !"; exit; } ?> Vas e-mail byl odeslan !<br> <br> <br> <a href="mail.php" target="_self">Napsat další</a></span> </big></big></div> </body>
  8.    if (mail ("$prijemce", "$predmet", "$text", "From: $odesilatel\r\n"));    else    {    echo "Nepodarilo se e-mail odeslat !";    exit;    } no promin .....    <big><big><span style="font-weight: bold;"> to sice neni predmetem problemu, ale nemuzu se nad tim nepozastavit. to je jedno. Tak tedy: problem bych nevidel primo ve fci mail(), i kdyz zapis    $result = @mail($prijemce, $predmet, $text, "From: $odesilatel\n");    if (!$result) die("Nepodarilo se e-mail odeslat !"); by byl mozna o chlup lepsi. Ale problem asi bude v cilovem postovnim serveru. Zkousel jsi posilat na jinou adresu?
  9. 4 peckma: Ve svém zdrojáku, ve funkci mail(), máš zadané proměnné v uvozovkách, což nesmí být. Problém bych hledal spíš tady...

← Zpět na všechna témata