These codes work with phpMailer. There is no reaction to butona press. why could it be? Do you have a suggestion? I ran the code on a blank project without including it in the project. I did not find any problems. I do not understand whether there is a mistake in the form.
index.php my home page
<?php include 'includes/header.php'; ?>
<?php include 'includes/slider.php';?>
<?php include 'includes/onepage-home.php';?>
<?php include 'includes/footer.php';?>
onepage-home.php contact form page
<div class="col-md-6 no-padding">
<div class="contact-forms">
<form class="b-form b-contact-form home-contact-form" method="post" action="../send.php">
<div class="row">
<div class="col-md-6">
<div class="input-wrap">
<input class="field-name input-lg i-field" placeholder="Name" name="name" type="text">
</div>
</div>
<div class="col-md-6">
<div class="input-wrap">
<input class="field-email input-lg i-field" placeholder="eMail" name="email" type="text">
</div>
</div>
</div>
<div class="input-wrap">
<input class="field-subject input-lg i-field" placeholder="Subject" name="subject" type="text">
</div>
<div class="input-wrap">
<input class="field-subject input-lg i-field" placeholder="Phone" name="phone" type="text">
</div>
<div class="input-wrap">
<input class="field-subject input-lg i-field" placeholder="Address" name="address" type="text">
</div>
<div class="textarea-wrap">
<textarea class="field-comments input-lg i-field" placeholder="Message" name="mail"></textarea>
</div>
<input class="button" value="Send" type="submit">
</form>
</div>
</div>
</div>
send.php mail send page
<?php
$mail_address = "mailsend@envem.com";
$mail_pass = "NFvm?[zv6}*i";
$send_address = "walidawad@envem.com";
$domain_address = "envem.com";
require './phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer();
$mail->isSMTP();
$mail->Host = "smtp.".$domain_address;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = $mail_address;
$mail->Password = $mail_pass;
$mail->setFrom('senaidbacinovic@gmail.com', 'Senaid Bacinovic');
$mail->addAddress($send_address);
$mail->name = $_POST["name"];
$mail->email = $_POST["email"];
$mail->Subject = $_POST["subject"];
$mail->phone = $_POST["phone"];
$mail->address = $_POST["address"];
$mail->mail = $_POST["mail"];
$mail->Body =
$_POST["name"]."\n".$_POST["email"]."\n".$_POST["subject"]."\n".$_POST["phone"]."\n".$_POST["address"]."\n".$_POST["mail"];
if(!$mail->send()){
echo '<script type="text/javascript">alert("Bir hata olustu.");</script>
<meta http-equiv="refresh" content="0;URL=index.php" />';
exit;
}
echo '<script type="text/javascript">alert("Mesaj Basariyla Gönderildi.");
</script> <meta http-equiv="refresh" content="0;URL=index.php" />';
?>
Aucun commentaire:
Enregistrer un commentaire