hi 🙂
i have a problem in sending email from php. i am using xampp server.
<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
STARTTLS;
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( $email ,$subject ,
$message, "From: $email" );
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>
</body>
</html>
i am getting the following error:
SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c10sm35541992wam.13 in C:\xampp\htdocs\mailform.php on line 13
when i changed the port =465 in php.ini file then there is no error but giving
waiting for localhost..... and nothing else
kindly help