Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-25-2009, 12:58 PM   PM User | #1
scaryhunter
New to the CF scene

 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
scaryhunter is an unknown quantity at this point
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.
scaryhunter is offline   Reply With Quote
Old 08-25-2009, 11:50 PM   PM User | #2
takenreality
New to the CF scene

 
Join Date: Aug 2009
Location: Colorado
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
takenreality is an unknown quantity at this point
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?
takenreality is offline   Reply With Quote
Old 08-26-2009, 10:48 AM   PM User | #3
scaryhunter
New to the CF scene

 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
scaryhunter is an unknown quantity at this point
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?
scaryhunter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:08 PM.


Advertisement
Log in to turn off these ads.