what is code for email sending through localhost pc..?

Answers were Sorted based on User's Feedback



what is code for email sending through localhost pc..?..

Answer / tanmoy

localhost pc not support to send mail.
but we can check it in our localhost web browser by this code:
$val= mail($to,$sub,$message,$headers);
echo "TO::".$to."<br>";
echo "FROM::".$fr."<br>";
echo "Sub::".$sub."<br>";
echo "Message:".$message."<br>";
exit();

Is This Answer Correct ?    4 Yes 1 No

what is code for email sending through localhost pc..?..

Answer / adrevol

You can send mails using mail() function in php.

But you need to configure the SMTP in your php.ini file

by default, it will be set to localhost
change the entry of SMTP = localhost to
SMTP =mail.xxx.com

Is This Answer Correct ?    5 Yes 6 No

Post New Answer

More PHP Interview Questions

Where is session id stored?

0 Answers  


What is meant by an associative array?

0 Answers  


when we use ob_start() function in php then the header() and session_start() does not gives the error like header already sent,please explain in brief

2 Answers  


Name some of the functions in php.

0 Answers  


How can we register the variables into a Session?

7 Answers   HCL, Star Computers, Trikon Networks,






What is a simple php method to make a cross domain data request?

0 Answers  


What is mysql_real_escape_string used for?

0 Answers  


What is difference between mysqli and mysql?

0 Answers  


how to display and include the user system date/time in a php program/project

1 Answers   Wipro,


Which methods should be used for sending an email using the variables $to, $subject, and $body?

0 Answers  


What are the advantages of using php?

0 Answers  


Are php sessions secure?

0 Answers  


Categories