0

i used this code for email

$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";

mail($to,$subject,$txt,$headers);

however this error shows up Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()..

i wanted to fix it without using outlook but the best solution i have googled so far is from this one, Drupal(Im not advertising it lol). However, I think I have to download Drupal. Is there any other way?

BTW i use XAMPP phpMyAdmin - 2.10.3

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by bakir
0

You are running this program on local host.
I think there should be a server on cloud to do that, not XAMPP on your system.
And i dont think Drupal is the solution for the problem. It is a complete CMS.
Vinayak

0

You are running this program on local host.
I think there should be a server on cloud to do that, not XAMPP on your system.
And i dont think Drupal is the solution for the problem. It is a complete CMS.
Vinayak

0

Ok so It should be live for it to work?

Yes
you can try any free web host for practicing(this is what i think you are doing) your PHP programs.
Vinayak

0

your error means that ur server is not configure to use smtp
or configured incorrectly which i dont think so .. are u using free webhosting?

or run it on local server?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.