+ 1

Web design

Hey guys., please i'm new to web programming....i mean the implementation of the knowledge i've got so far into a new web project but i'm currently facing an issue in the verification of a user in terms of emailing new uers via localhost. Can anything be done about this cos i keep getting an error that goes like this WARNING: MAIL():SMTP SERVER RESPONSE: 503 NO VALID RECIEPIENTS SPECIFIED .. Here's my code ....... <!doctype html> <html> <head> </head> <body> <?php require "configure.php"; if(isset($_POST['submit'])){ $name=$_POST['name']; $email=$_POST['email']; $data="register"; $word=new mysqli(DB_SERVER,DB_NAME,DB_PASS,$data); if($word){echo "connected"; $hash=md5(rand(0,1000)); $password=rand(1000,5000); $hole=$word->prepare("insert into users (username,password,email,hash) values (?,?,?,?) "); $hole->bind_param('ssss',$name,$password,$email,$hash); $hole->execute(); } } $to = $email; $subject = 'signup process for testing'; $message='thanks for joining loinder please click the link below to verify your account : http://wwww.yourwebsite.com/verify.php?email='.$email.'&hash='.$hash.' '; $headers='From: MAISER@host.domain'; mail($to,$subject,$message,$headers); ?> <form action="" method="POST"> <input type="text" name="name" value="" placeholder="firstname"> <input type="email" name="email" value="" placeholder="enter email adress"> <input type="submit" name="submit" value="signup"> </form> </body> </html>

24th May 2017, 9:25 PM
moses
moses - avatar
1 Answer
+ 4
unfortunately now you cannot send from localhost. you need to setup mail server and then you can try to send mail. I suggest you for sending email. check free hosting who support sending mail. for more ask it to google then try.
24th May 2017, 9:46 PM
Hasan Misbah
Hasan Misbah - avatar