what is code for email sending through localhost pc..?
Answers were Sorted based on User's Feedback
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 |
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 |
what is constructor
What is the use of session and cookies in php?
How to check curl is enabled or not in PHP
how can we check mail function with '127.0.0.1' (before submitting a site?
What are escaping characters?
How to make multilanguage site in php? (like english,tamil)
Tell me how can we connect to a mysql database from a php script?
What is the correct syntax of mail() function in php?
What is difference between html and php?
What is difference between rest and http?
What is use of isset function in php?
Is php 7 backwards compatible?