Jump to content

[SOLVED] Mail function help


EchoFool

Recommended Posts

I keep get a mail function error related to my server but do not know what i have to do to solve the problem.. this is my error:

 

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in login.php on line 401

 

Script:

<?php
		$subject = "Login Infomation Desk";
				$headers = 'From: [email protected]' . "\r\n" .
				'Reply To: [email protected]' . "\r\n" .
				'X-Mailer: PHP/' . phpversion();
		$message = "A username ".$Username." has requested help !\r\n\r\n";
		$message = $message. "Their message is: \r\n".$Message."\r\n\r\n";
		$message = $message. "Username is: ".$Username."\r\n";
		$message = $message. "Email is: ".$Email;
		mail($Email, $subject, $message, $headers);
?>

 

What i done wrong? (also i blanked out my domain email to avoid spam attacks)... hope you can help

Link to comment
https://forums.phpfreaks.com/topic/157643-solved-mail-function-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.