February 22, 200917 yr Hi, I'm getting a warning when trying to send an email.And the email isn't sent Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 7sm3546969eyg.47 I'm simply using XAMPP and a mail() with to,message,subject, from header .Also downloaded and installed QK SMTP SERVER and runned it The point is that I used the exact example showed by a TUTORIAL (not copy/paste, but the exact file).For some reason it isn't working on my PC and can't find anything on google to help.The only thing I found was something about how you needed to change something for the TLS...but wasnt too clear. Here's the code just in case(but don't really think that is a problem as it is really a good thorough tutorial) but it's made for php 4 so a bit older... $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$_POST['name']." ".$_POST['othername']."<".$_POST['email'].">\r\n"; mail('stefyx@gmail.com',$_POST['subject'],$message, $headers); Ideas?
Create an account or sign in to comment