<form action="email.php" method="post"> <fieldset> <input type="text" id="name" name="name" placeholder="نام"> <input type="text" id="email" name="email" placeholder="پست الکترونیک"> <input type="text" id="subject" name="subject" placeholder="عنوان پیام"> <textarea rows="3" id="description" name="description" placeholder="پیام شما"></textarea> <button type="submit" value="send" >ارسال ایمیل</button> <button type="reset" >پاک کردن</button> </fieldset> </form>
<?php //--------------------------Set these paramaters-------------------------- // Subject of email sent to you. $subject = 'تماس با ما سایت'; // Your email address. This is where the form information will be sent. $emailadd = 'xxxx@gmail.com'; // Where to redirect after form is processed. $url = 'index.html'; // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty. $req = '0'; // --------------------------Do not edit below this line-------------------------- $text = "\n\n"; $space = ' '; $line = ' '; foreach ($_POST as $key => $value) { if ($req == '1') { if ($value == '') {echo "$key is empty";die;} } $j = strlen($key); if ($j >= 20) {echo "Name of form element $key cannot be longer than 20 characters";die;} $j = 20 - $j; for ($i = 1; $i <= $j; $i++) {$space .= ' ';} $value = str_replace('\n', "$line", $value); $conc = "{$key}:$space{$value}$line"; $text .= $conc; $space = ' '; } mail($emailadd, $subject, $text, 'From: '.$emailadd.''); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; ?>
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add example@example.com to your trusted senders list in your email software.