Skip to content
← Back to Community
How to make an email server in replit.
Profile icon
[deleted]

Hi everyone. So I want to make an email server in replit using html and php, but it is not working for reasons I am unaware of. Is php supported in replit?
Also, is there any other way to send a form to my email rather than using php?
Thanks!!!

Answered by RYANTADIPARTHI [earned 5 cycles]
View Answer
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

You can use the mail() keyword.

<?php // the message $msg = "something\nmore something"; $msg = wordwrap($msg,70); // send email mail("[email protected]","something",$msg); ?>

Maybe try that.

Profile icon
[deleted]

@RYANTADIPARTHI
is php supported in replit with html? I know that replit has php servers, but I am not sure whether we can use a php file in a html program. Could you please clarify whether the program is working for you by making a replit as such?
Thanks! :)

Profile icon
RYANTADIPARTHI

@dhruvkumarrajan yes it is. i've seen many repls with PHP using html.

Profile icon
[deleted]

@RYANTADIPARTHI
OK. Does the above code run correctly in replit?

Profile icon
RYANTADIPARTHI

@dhruvkumarrajan you try it. If it doesn't ping me. I'll give you an alternate. to the most it should.

Profile icon
[deleted]

@RYANTADIPARTHI
Ok, Thanks!

Profile icon
RYANTADIPARTHI