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

How many ways you can delete a session variable ?

6 Answers  


Tell me what are magic methods?

0 Answers  


What is csrf validation?

0 Answers  


What are psrs?

0 Answers  


Which method removes the last element from the end of an array?

0 Answers  






What is the difference between the functions UNLINK and UNSET?

8 Answers   Silicon Biztech,


Tell me how can we pass the variable through the navigation between the pages?

0 Answers  


What is the difference between php and core php?

0 Answers  


What are the different ways to login to a remote server?

0 Answers  


Do you know what does mvc stand for and what does each component do?

0 Answers  


Tell me how stop the execution of a php scrip?

0 Answers  


What is the use of @ in php?

0 Answers  


Categories