Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry PHP Mail()..I'm really lost :(

    Hello everyone ! (Please read ..-This is my 4th day and this code is not willing to work-
    First of all i'm a newbie :P...I'm still learning PHP5 but got stuck at PHP mail();

    Here is My PHP code:----
    <?php
    $name = $_POST['name'];
    $email = $_POST['email'];
    $feedback = $_POST['feedback'];

    $toaddress = "Other E-mail address";
    $subject = "FeedBack from website";

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

    $fromaddress = "From: My Yahoo Address";

    mail($toaddress, $subject, $mailcontent, $fromaddress);
    ?>
    <html>
    <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>

    ----
    Yes i edited php.ini where i added the SMTP and SMTP_Port and Send_from..(I want Yahoo to send e-mails from)
    Also in smtp.php i changed the values

    class Mail_smtp extends Mail {

    var $_smtp = null;

    var $host = 'smtp.bizmail.yahoo.com';

    var $port = 25;

    var $auth = true;

    var $username = 'Myusername';

    var $password = 'Mypassword';

    var $localhost = 'localhost';

    var $timeout = null;
    ----

    After i click send from the HTML forum...I always get this error

    Warning: mail(): SMTP server response: 530 authentication required - for
    help go to (Some Yahoo Help Link) in c:\program
    files\apache group\apache\htdocs\viewfeedback.php on line 15

    I receive the error above when I attempt to send mail via a PHP script.

    How can i solve this situation?



    Thanks for your time Reading.

  • #2
    New to the CF scene
    Join Date
    Aug 2009
    Location
    Colorado
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it has to be your server setup because your code works fine on mine. can you send the mail out from your server rather than through the yahoo one?

  • #3
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by takenreality View Post
    it has to be your server setup because your code works fine on mine. can you send the mail out from your server rather than through the yahoo one?
    No i haven't, how can i do that?


  •  

    Posting Permissions

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