ارسال متن از سایت به email

hinatiloos

New Member
با سلام
من میخوام برای قسمت پیشنهاد و انتقاد سایتم text box(جعبه متن)درست کنم,کاربران نظرات خودشون رو در اون جعبه بنویسن ودر آخر دکمه ارسال رو بزنن و این نوشته هاشون به ایمیل سایتم ارسال بشه(در ضمن منظورم این نیست که نرم افزار out lookباز بشه ودر اون نظراتشونو بنویسن)
البته در front page منوinsert--formمیشه این جعبه متن ها رو ساخت ولی مشکل اینجاست که ارسال نمیشه و نمی دونم کجا باید ایمیل رو وارد کنم.لطفاً در این باره کمکم کنید
با تشکر
 

afshin3a

Member
سرور دانشگاه ما احتمالا php ساپورت نمیکنه.من که خودم نتونستم ازش استفاده کنم.
<?php

/*

Thank you for choosing FormToEmail by FormToEmail.com

Version 1.7 August 13th 2006

COPYRIGHT FormToEmail.com 2003 - 2006

You are not permitted to sell this script, but you can use it, copy it or distribute it, providing that you do not delete this copyright notice, and you do not remove any reference to FormToEmail.com

DESCRIPTION

FormToEmail allows you to place a form on your website which your visitors can fill out and send to you. The contents of the form are sent to the email address which you specify below. The form allows your visitors to enter their name, email address and comments. If they try to send a blank form, they will be returned to the form.

Your visitors (and nasty spambots!) cannot see your email address! The script cannot be hijacked by spammers.

When the form is sent, your visitor will get a confirmation of this on the screen, and will be given a link to continue to your homepage, or other page if you specify it.

Should you need the facility, you can add additional fields to your form, which this script will also process, without making any additional changes.

This is a PHP script. In order for it to run, you must have PHP (version 4.1.0 or later) on your webhosting account. If you are not sure about this, then please ask your webhost about it.

SETUP INSTRUCTIONS

Step 1: Put the form on your webpage
Step 2: Enter your email address and continue link below
Step 3: Upload the files to your webspace

Step 1:

To put the form on your webpage, copy the code below as it is, and paste it into your webpage:

<form action="FormToEmail.php" method="post">
<table border="0" bgcolor="#ececec" cellspacing="5">
<tr><td><font face="arial" size="2">Name</font></td><td><input type="text" size="30" name="Name"></td></tr>
<tr><td><font face="arial" size="2">Email address</font></td><td><input type="text" size="30" name="Email"></td></tr>
<tr><td valign="top"><font face="arial" size="2">Comments</font></td><td><textarea name="Comments" rows="6" cols="30"></textarea></td></tr>
<tr><td>&nbsp;</td><td><input type="submit" value="Send"><font face="arial" size="1">&nbsp;&nbsp;FormToEmail by <a href="http://FormToEmail.com">FormToEmail.com</a></font></td></tr>
</table>
</form>

Step 2:

Enter the email address below to send the form to:

*/

$my_email = "[email protected]";

/*

Enter the continue link to offer the user after the form is sent. If you do not change this, your visitor will be given a continue link to your homepage:

If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "thanks.htm"

*/

$continue = "/";

/*

Step 3:

Save this file (FormToEmail.php) and upload it together with your webpage to your webspace. IMPORTANT - The file name is case sensitive! You must save it exactly as it is named above! Do not put this script in your cgi-bin directory (folder) it may not work from there.

THAT'S IT, FINISHED!

You do not need to make any changes below this line.

*/

// This line prevents values being entered in a URL

if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}

// Check referrer is from same site.

if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){print "Please enable referrer logging to use this contact form. Your message was not sent."; exit;}

// Describe function to check for new lines.

function new_line_check($a)
{

if(preg_match('`[\r\n]`',$a)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

new_line_check($_POST['Name']);

// Check for disallowed characters in the Name and Email fields.

$disallowed_name = array(':',';','"','=','(',')','{','}','@');

foreach($disallowed_name as $value)
{

if(stristr($_POST['Name'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

new_line_check($_POST['Email']);

$disallowed_email = array(':',';',"'",'"','=','(',')','{','}');

foreach($disallowed_email as $value)
{

if(stristr($_POST['Email'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

$message = "";

// This line prevents a blank form being sent, and builds the message.

foreach($_POST as $key => $value){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}

$message = $message . "-- \nThank you for using FormToEmail from http://FormToEmail.com";
$message = stripslashes($message);

$subject = "FormToEmail Comments";
$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " . $_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";

mail($my_email,$subject,$message,$headers);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>Form To Email PHP script from FormToEmail.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-uk">
</head>

<body bgcolor="#ffffff" text="#000000">

<div>
<center>
<font face="arial" size="2"><b>Thank you <?php print stripslashes($_POST['Name']); ?>!</b>
<br>Your message has been sent</font>
<p><font face="arial" size="2"><a href="<?php print "$continue"; ?>">Click here to continue</a></font></p>
<p><font face="arial" size="2"><b>FormToEmail</b> by <a href="http://FormToEmail.com">FormToEmail.com</a></font></p>
</center>
</div>

</body>
</html>
 

hinatiloos

New Member
afshin3a
ba tashakor
shoma baraye drost shodane resolution siteton bayad ba klick rast kardan roye jadval haton va entekhabe table propertise
gozineye in percent
ro entekhab konid va bad site ton ro tarahi iee jadid konid age natonestid be man begid ta khodam in safhe va form home pageton ro besazam va baraton befrestam
 

mahgol91

Member
بدون php

می تونی بدون استفاده از php هم این فرم را درست کنی.
فقط کافیه توی سایت response-o-matic.com عضو بشی و فرم را اونجا درست کنی بعد خود سایت کد مربوط به فرم را می دهد و می توانی آن را Copy & Paste کنی و به صورت خودکار محتویات فرم به ایمیلت ارسال می شه. من یه نمونه ازش رو توی وبلاگم دارم می تونی اونجا ببینیش:
http://blogs.cjb.net/mylink
 

hinatiloos

New Member
afshin3a
لطفاٌ step2 va 3 رو برام توضیح بده و بگو کد های اضافی step2به چه درد میخوره
 

samin.

Member
البته اين كد هم يه اشكالاتي داره كه دردسر ساز ميشه
من تستش كردم جواب نداد
اما اگه مي خواي به من ايميل بزن برات بفرستم درستشو
 
سلام
من نرم افزاری دارم که میتونیم با اون هر فرمی رو طراحی کنیم و بعد به آدرس ایمیلی ارسال بشه
نمونه اش :
www.iranagency.comهر فرمی که داریم مانند تماس با ما و سفارش و ... از این برنامه هست
 

soheil_v

Member
سلام
من نرم افزاری دارم که میتونیم با اون هر فرمی رو طراحی کنیم و بعد به آدرس ایمیلی ارسال بشه
نمونه اش :
www.iranagency.comهر فرمی که داریم مانند تماس با ما و سفارش و ... از این برنامه هست


دوست عزيز سلام

ميشه اين برنامه را معرفي كنين

با تشكر
 
سلام
نام این برنامه که من خریدم فرم بیلدر هیت و به صورت دسکتاپ
اگه خواستید فرمتون رو بدید من براتون آماده میکنم و براتون میفرستم
موفق باشید
 

afshin3a

Member
afshin3a
ba tashakor
shoma baraye drost shodane resolution siteton bayad ba klick rast kardan roye jadval haton va entekhabe table propertise
gozineye in percent
ro entekhab konid va bad site ton ro tarahi iee jadid konid age natonestid be man begid ta khodam in safhe va form home pageton ro besazam va baraton befrestam
مشکل رزلوشن من حل شد.متشکرم.
 

shnoit

Well-Known Member
دوست عزیز همچین چیزی چندین باز در انجمن مطرح شده.
و نیازی هم نبود که شما در 2 قسمت و با دو عنوان همچین تاپیکی ایجاد نمایید، من در هر دو قسمت جواب نوشتم که زودتر متوجه بشین ، و گرنه منظوری ندارم.

اگه یه جستجوی کوچیک انجام میدادین زودتر به جواب هم میرسیدین:)

لینک آموزش ساخت همچین فرمی، در قسمت مقالات اصی خود:
http://www.majidonline.com/page.php?page=content&op=cntshow&code=262

موفق باشید.
 

جدیدترین ارسال ها

بالا