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.
|