1

I'm new to PHP and have some problem on my registration form. The script as below cannot function. And keep error

Warning: mail(): SMTP server response: 550 This is a submission only port. You must authenticate before sending mail in E:\inetpub\abc.com.my\wwwroot\abc_Draft9_190713\processor.php on line 40"Any idea? thank.

<?php 

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
$title = $_REQUEST['textfield_1'];
$firstname = $_REQUEST['textfield_2'];
$lastname = $_REQUEST['textfield_3'];
$email = $_REQUEST['textfield_4'];
$mobile = $_REQUEST['textfield_5'];
$interesteddevelopement = $_REQUEST['textfield_6'];
$message = $_REQUEST['textfield_7'];

if (!($firstname && $lastname && $mobile && $email && $interesteddevelopement &&     $message)) {
?>

<script language = 'javascript'>
alert('Please fill in every required field.');
history.back(); 
</script>

<?php 
exit();
} else {

ini_set("SMTP","mail.abc.com.my");
ini_set("smtp_port","587");
//ini_set('sendmail_from', 'ValidEmailAccount@YourDomain.com');

$headers = "From: $email";

mail("abc@interactive.com.my","abc Website Enquiry Form","


Title : " . $_POST['textfield_1'] . "
First Name : " . $_POST['textfield_2'] . "
Last Name : " . $_POST['textfield_3'] . "
Email : " . $_POST['textfield_4'] . " 
Mobile : " . $_POST['textfield_5'] . "
Interested Developement : " . $_POST['textfield_6'] . "
Message : " . $_POST['textfield_7'] . "

",$headers);

include("confirmed.html");
}

?>
BenMorel
  • 34,448
  • 50
  • 182
  • 322

1 Answers1

0

php.ini & SMTP= - how do you pass username & password

PHP mail() command does not support authentication. Your options: ...

Community
  • 1
  • 1
AnFi
  • 10,493
  • 3
  • 23
  • 47