Results 1 to 2 of 2

Thread: PHP Mail() problem !

  1. #1
    scaryhunter Guest

    Arrow PHP Mail() problem !

    Hi everyone !
    I'm a " newbie ", i've reached chapter 3 in my book that talks about PHP mail()
    I wrote this code
    PHP Code:
    <?php
    $name 
    $_POST['name'];
    $email $_POST['email'];
    $feedback $_POST['feedback'];

    $toaddress "Something@yahoo.com";
    $subject "FeedBack from website";

    $mailcontent "Customer name:".$name."\n";
    "Customer E-mail:".$email."\n";
    "Customer Comments:".$feedback."\n";

    $fromaddress "From : [email]Something@yahoo.com[/email]";

    mail($toaddress$subject$mailcontent$fromaddress);
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Bob's Auto Part - Feedback Submitted</title>
    </head>
    <body>
    <h1>Feedback Submitted</h1>
    <p>Your feedback has been sent.</p>
    </body>
    </html>
    Okay i went to php.ini and changed the SMTP, SMTP_port and Send_From...I dont know why it says" Failed to send, check SMTP and SMTP_port.
    I think because i want to send e-mail from Yahoo , i should add Username and Password..But i don't know how.

    Please if you know how to add username and password, i'll appreciate it so much.

  2. #2
    Join Date
    Apr 2009
    Location
    The toon
    Posts
    1,225
    You need to upload the script to a server which supports PHP mail

    Commercial hosting have SMTP servers running in order to push the email out to its destination. If you want to send mail from your machine {local environment} then you need an SMTP server installed

Similar Threads

  1. Flash mail form + php big problem
    By irka in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 09 Dec 2009, 07:00 AM
  2. PHP form submit problem
    By simononestop in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 15 Jun 2009, 10:42 PM
  3. PHP mail function with AOL IDs on Linux
    By jeephp in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 21 Apr 2006, 04:33 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •