How can I send Email from SoloLearn playgrownd with function mail() ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

How can I send Email from SoloLearn playgrownd with function mail() ?

What's wrong with my code? https://code.sololearn.com/w25UCRXMBjr7/?ref=app

16th Aug 2018, 8:59 PM
Dmitriy
Dmitriy - avatar
6 Answers
+ 3
I don't think you can, but this is just my guess. [Edit] https://www.sololearn.com/Discuss/1249597/?ref=app
16th Aug 2018, 9:13 PM
Maz
Maz - avatar
+ 2
No you can not. mail function requires mail server
16th Aug 2018, 9:35 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Not possible with mail(). phpmailer does that.
16th Aug 2018, 11:28 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Yes of course not since php playground is what it is. It’s not possible since http request are not ether. It would take too much from the compiler when we consider how many requests sololearn gets.
16th Aug 2018, 11:38 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
Maz , Toni Isotalo , what about using non local SMTP mail server?
16th Aug 2018, 11:26 PM
Dmitriy
Dmitriy - avatar
+ 1
Toni Isotalo , as I understand,PHPMailer works on *nix system using sendmail. I think PHPMailer will not work on SoloLearn playground. But I trust that must be a way to send Email from SL playground
16th Aug 2018, 11:36 PM
Dmitriy
Dmitriy - avatar