954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mail php error

I have the following code in send_email.php

<body>
		
	  <?php	 
      // send mail code
           
      $name=$_GET["name"];
      $email=$_GET["email"];
      $message=$_GET["message"];
      
      ?>
      
      
      Name	  :  <?php echo $name; ?>
      email   :  <?php echo $email;?>
      message :  <?php echo $message;?>
      
	  
      <?php
	  //$to = 'david_yg20@yahoo.com';
	  $to = 'garudamedia@localhost';
	  $subject = 'e-mail feedback';
	  
	  ini_set('sendmail_from', 'admin@localhost');
	  ini_set('SMTP', 'localhost');
	  //ini_set('SMTP', 'smtp.mail.yahoo.co.id');
	  //ini_set('smtp_port','25');
	  
	  $message2 = "Name	  : " + $name + "email   : " + $email + "message : " + $message;  
	  
	  mail($to, $subject, $message2);
	  ?>
      Telah di kirim!
      
      
      
    
      
</body>
</html>


It suppose to send me feedback message regarding my webpage to my garudamedia@localhost e-mail.

1. It did work accept that the message only give me "0" number, why is that? What is the correct syntax ?

2. I tried another option which is to send the feedback e-mail to my [email]david_yg20@yahoo.com[/email] e-mail. Yet, I have not find the correct codes to send the feedback message to my yahoo mail. I keep receiving 503 yahoo mail error authentication (or something similars). What is the correct syntax to send my feedback e-mail to my yahoo mail ?

Thanks.

davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

I'm assuming your issue is on message2:

//$message2 = "Name	  : " + $name + "email   : " + $email + "message : " + $message;  
//change that to this  (+ is javascript) (. is php):
$message2 = "Name: " . $name . " email: " . $email . " message : " . $message;
ddymacek
Posting Whiz
317 posts since Jun 2010
Reputation Points: 36
Solved Threads: 64
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: