So I’m using lam-poc to use php and tried the mail() function, but so far none of it works
PHP Code:
// the message
$msg = "First line of text\nSecond line of text";
// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);
// send email
$mail = mail("fnhdiscord@gmail.com","My subject",$msg);
if(mail) {
echo 'Working!';
}
?>```
Hi, I am having the same problem, after introducing that code to the glitch.json in order to fix the problem with the php redirection page. The mail() function doesn’t work, it is supposedly sent but I don’t receive any email. Have you solved?
Hi! Welcome to the community, @deadshadow99. Please don’t bump old posts: that makes them go to the top of the list! Instead, this kind of post needs a fresh new topic.
I don’t believe that the mail() function works, as it does not work with replit either. It probably has to do with the way glitch and replit host your projects on their servers, I assume that they have prevented it because it’s a potential security vulnerability. But can you possibly send the code? also, look into php mailer: https://github.com/PHPMailer/PHPMailer, it might help