hi memmbers
can anyone suggest me how to run mail() function of PHP on localhost??? I want to check my inquiry page??

Recommended Answers

All 4 Replies

i think this could help

$sendTo = 'test@localhost'; //valid email address created on your localhost mail server
$subject = 'This is the subject';
$headers = "From: testing@localhost";
$msg = "The quick brown fox jumps over the lazy dog";

ini_set("SMTP","127.0.0.1");
ini_set("smtp_port","25");
mail($sendTo, $subject, $msg, $header);

use phpmsiler() function if you want to check on localhost

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.