j'ai un probleme concernant le envoie d'e-mail on utilisons le easyphp
voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<form action="contact.php" method="post">
        <fieldset>
            <legend>Contact Information</legend>
                First Name: <input type="text" name="fname" id="fname" value="" /><br />
                Last Name: <input type="text" name="lname" id="lname" value="" /><br />
                Phone Number: <input type="text" name="number" id="number" value="" /><br />
                E-Mail Address: <input type="text" name="email" id="email" value=""  /><br />
                Confirm E-Mail Address: <input type="text" name="confemail" id="confemail" value=""  /><br />
        </fieldset><br />
        <fieldset>
            <legend>Extra Info</legend>
                <label for="youneed">Tell Us What You Need:</label><br />
                    <textarea name="youneed" value="youneed"></textarea>
        </fieldset><br />
        <fieldset>
            <legend>Submit And We'll Get Back To You</legend>
                <input type="submit" id="submit" value="Submit" />
        </fieldset>                  
    </form>
code php est
<?php
if (isset($_POST["email"]))
    {
        $myemail ="contact@daintydeliites.com" ;
        $subject ="Contact Form From DD Site" ;
        $mailheader ="From:" . $_POST["email"] . "\r \n" ;
        $mailheader ="Reply-To:" . $_POST["email"] . "\r \n" ;
        $mailheader ="Content-type: text/html" ;
        $MESSAGE_BODY ="First Name:" . $_POST["fname"] . " " ;
        $MESSAGE_BODY ="Last Name:" . $_POST["lname"] . " " ;
        $MESSAGE_BODY ="Phone Number:" . $_POST["number"] . " " ;
        $MESSAGE_BODY ="E-Mail Address:" . $_POST["email"] . " " ;
        $MESSGAE_BODY ="I Need:" . $_POST["youneed"] . " " ;
        mail ($myemail, $subject, $MESSAGE_BODY, $mailheader);
    }
else
    {
        die("Your email failed to send, please check your email address.");
    }
?>
l'erreur est :
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Program Files\EasyPHP-12.1\www\action.php on line 15