Consider you have configured SMPT server and following code:
if ( mail  ("My friend" , "Hello friend" , "Hello friend" ) )
   echo "Email sent";
  echo "Wrong email!";
What will be the output after executing following code?
The mail() function allows you to send emails directly from a script. Mail() function pass the email to SMTP server without validation recipient email and returns TRUE.

@vergeams28 , have you tried to run this code in online ide?

2016 Oct 26, 10:57:58 PM

Output for 5.6.0 - 5.6.26, 7.0.0 - 7.1.0RC3 Warning: mail() has been disabled for security reasons in /in/IDCZn on line 2 Wrong email! Output for hhvm-3.10.0 - 3.14.4 Wrong email!

2016 Oct 4, 4:47:06 PM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
PHP quizzes
Sign Up Now
or Subscribe for future quizzes