BG Development


  Reply to this topicStart new topicStart Poll

> ICN php mail , ?
berge
: 14-07-2018, 13:36
Quote Post



:
:
:

: 15
: 30.10.17



, php mail - ? , ?..

CODE

<?php

header('Content-Type: text/html; charset=utf-8');
header('Content-Transfer-Encoding: 8bit');
$mailStat = "";
if (isset($_POST['submit'])) {
if ($_POST['name'] && $_POST['email'] && $_POST['subject'] && $_POST['message']) {

$mailFrom = $_POST['email'];
$to = 'berge@abv.bg';
$subject = $_POST['subject'];
$name = $_POST['name'];
$message = ' '.$name. ":<br /><br />" .$_POST['message'];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: ' ." Saita.com\r\n" .
'Reply-To: '.$mailFrom. "\r\n" .
'X-Mailer: PHP/' . phpversion();

$success = mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $headers);

if ($success) {
$mailStat = "<font color='#060'> ".$to." .</font>";
} else {
$mailStat = "<font color='#d00'> ".$to."</font>";
}
} else {
$mailStat = "<font color='#00d'>, !</font>";
}
}

?>


<main>
<h1> e@mail</h1>
<img src="img/mail.png" />
<form action="" method="post">

<input class="input" type="text" name="name" placeholder=" " />
<input class="input" type="text" name="email" placeholder=" e-mail" />
<input class="input" type="text" name="subject" placeholder="" />
<textarea name="message" placeholder=""></textarea>
<input class="input" id="submit" type="submit" name="submit" value="">
<br />
<p><?php echo "uj prateno"; ?></p>
<br />
<p> .</p>
</form>
</main>


!

berge 14-07-2018, 13:38
PMEmail Poster
Top
1 (1 , 0 )
, :

Topic Options Reply to this topicStart new topicStart Poll

 


Copyright © 2003-2018 | BG Development | All Rights Reserved
RSS 2.0