How to use php mail() in sololearn mobile app ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use php mail() in sololearn mobile app ?

it gives error for SMTP mail server

7th Jul 2017, 6:06 PM
Mohit Mehta
Mohit Mehta - avatar
3 Answers
0
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ..\Playground\ PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ..\Playground\
7th Jul 2017, 6:46 PM
Mohit Mehta
Mohit Mehta - avatar
0
<?php $to = "[email protected]"; $subject = "My subject"; $txt = "Hello world!"; $headers = "From: [email protected]" . "\r\n" . "CC: [email protected]"; mail($to,$subject,$txt,$headers); ?>
7th Jul 2017, 6:50 PM
Mohit Mehta
Mohit Mehta - avatar
0
but it doesn't. it works well in pc. but i want to try it here
7th Jul 2017, 6:53 PM
Mohit Mehta
Mohit Mehta - avatar