...

View Full Version : PHP Mail()..I'm really lost :(



scaryhunter
08-25-2009, 01:58 PM
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.

takenreality
08-26-2009, 12:50 AM
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?

scaryhunter
08-26-2009, 11:48 AM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum