Skip to content
Sign upLog in
← Back to Community

how to send email with PHP on repl?

Profile icon
ChezCoder

I want to create an email verification system:

$email = $_POST["email"]; $vcode = $_POST["code"]; # lets pretend send was the email function send($email,"Verify your email!","[email protected]",$vcode); echo " <input id='vemail'> <button id='verify'>Verify!</button> <script> document.getElementById('verify').click() = function(){ if (document.getElementById('vemail') == $vcode){ alert('Successful!') window.open('/home.php','_self') } else { alert('Please try again.') } </script> ";
Voters
Profile icon
StealthHydra179
Profile icon
ChezCoder
Comments
hotnewtop
Profile icon
SixBeeps

Use the mail() function

Profile icon
[deleted]

Surprisingly simple

@SixBeeps

Profile icon
ChezCoder

@IzanLarumbe
@SixBeeps
doesn't work

Profile icon
SixBeeps

@ChezCoder
Did you ad a From header in your php.ini file?

Profile icon
ChezCoder

@SixBeeps
?