香港寵物小精靈村落 論壇

 找回密碼
 加入
查看: 2229|回復: 7
打印 上一主題 下一主題

[求助] E-mail form

[複製鏈接]
跳轉到指定樓層
1#
發表於 1/5/2008 02:02 AM | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問html可唔可以整到hide E-mail但係又可以透過填form來send E-mail 比我?
e.g. http://edition.cnn.com/feedback/forms/form3.html?1
(最好有埋果d咩咩"廣東話按一字" "English press 2"....select category"反捕鯨" "環保" "其他生態") etc.

同埋, html可唔可以整到d 反呢樣反果樣ge 簽名活動, 即係有封pre-written ge信, 之後又係叫人簽名
簽名會直接由參加者已身E-mail 寄去 事件負責人 (例如捕鯨人土)
e.g. http://www.greenpeace.org/intern ... dove-palmoil-action

如果冇, 有咩網站可以提供呢類素材?
2#
發表於 1/5/2008 03:01 PM | 只看該作者
原帖由 dolphin_ice 於 1/5/2008 02:02 發表
請問html可唔可以整到hide E-mail但係又可以透過填form來send E-mail 比我?
e.g. http://edition.cnn.com/feedback/forms/form3.html?1
(最好有埋果d咩咩"廣東話按一字" "English press 2"....select category"反捕 ...

單是HTML的話不可以直接send出, 一定要經過第三方軟件(OE等)中已設定的SMTP Server 送出..
但很多人只用Web mail, 所以沒有在客戶端設好Setting..

所以建議可以用PHP送出郵件, 使Mail不用經過客戶端送出..

第二個問題同樣PHP可以幫你..

[ 本帖最後由 火雞一隻 於 1/5/2008 03:03 PM 編輯 ]
回復

使用道具 舉報

3#
發表於 2/5/2008 05:22 PM | 只看該作者
html可寫到表...但要php 去sd...我曾經寫過ge...
回復

使用道具 舉報

4#
 樓主| 發表於 6/5/2008 01:07 AM | 只看該作者
謝謝, 求code

原帖由 火雞一隻 於 1/5/2008 03:01 PM 發表

單是HTML的話不可以直接send出, 一定要經過第三方軟件(OE等)中已設定的SMTP Server 送出..
但很多人只用Web mail, 所以沒有在客戶端設好Setting..

所以建議可以用PHP送出郵件, 使Mail不用經過客戶端送出..

...

是否寄信者可以在寄件箱中找到寄去的E-mail address?

thanks
回復

使用道具 舉報

5#
發表於 6/5/2008 08:15 AM | 只看該作者
指定E-mail(未測試, 請先測試..)

<?
if (isset($_POST['post']) && $_POST['title'] && $_POST['massage']){
$to  = 'admin@lugia.org';

$message = '
<html>
<head>
  <title>'.htmlspecialchars($_POST['title']).'</title>
</head>
<body>
'.nl2br(htmlspecialchars($_POST['massage'])).'
</body>
</html>
';

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

mail($to, $_POST['title'], $message, $headers);
exit('Finish');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing</title>
</head>

<body>
<form id="form1" method="post" action="">
  <p>Title:<br />
    <label>
    <input name="title" type="text" id="title" maxlength="50" />
    </label>
</p>
  <p>Massage:<br />
    <label>
      <textarea name="massage" id="massage" cols="45" rows="5"></textarea>
    </label>
  </p>
  <p>
    <label>
    <input type="submit" name="send" id="send" value="Send" />
    </label>
    <label>
    <input type="reset" name="reset" id="reset" value="Reset" />
    </label>
    <input name="post" type="hidden" id="post" value="1" />
  </p>
</form>
</body>
</html>


同樣, 有指定內容
<?
if (isset($_POST['post']) && $_POST['name']){
$to  = 'admin@lugia.org';

// message
$message = '
<div id="open-letter">
    <p> Dear Group CEO Patrick Cescau, </p>
  <p> The palm oil Unilever buys to make Dove soap is destroying forests and  speeding up climate change. Your palm oil suppliers continue to destroy  Indonesia\'s precious rainforests for palm plantations, even though they  have promised to change. They haven\'t changed, but Unilever still buys  from them, with no consideration for the endangered animals and people  who depend on these forests. </p>
  <p> Unilever is one of the biggest global consumer  goods companies and buys around 1.3 million tonnes of palm oil every  year. A truly responsible company would not buy from suppliers who  trash forests. Unilever should call for an immediate halt to the  destruction of Indonesia\'s forests for palm oil. </p>
  <p> Wrecking rainforests for soap and other  products is wrong. Will you help save the forests now, or continue  destroying them? </p>
  <p> Sincerely, </p>
  <p> <em>'.htmlspecialchars($_POST['name']).'</em> </p>
</div>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

// Mail it
mail($to, 'AN OPEN LETTER TO UNILEVER', $message, $headers);
exit('Finish');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing</title>
</head>

<body>
<form id="form1" method="post" action="">
  <p>Name:<br />
    <label>
    <input name="name" type="text" id="name" maxlength="50" />
    </label>
</p>
  <p>
    <label>
    <input type="submit" name="send" id="send" value="Send" />
    </label>
    <label>
    <input type="reset" name="reset" id="reset" value="Reset" />
    </label>
    <input name="post" type="hidden" id="post" value="1" />
  </p>
</form>
</body>
</html>

[ 本帖最後由 火雞一隻 於 6/5/2008 08:25 AM 編輯 ]

評分

參與人數 1金幣 +10收起 理由
dolphin_ice+ 10熱心解答他人問題

查看全部評分

回復

使用道具 舉報

6#
 樓主| 發表於 6/5/2008 04:02 PM | 只看該作者
哇! 多謝晒!!

點解2個paste落html都係得一堆code? 唔見有表 oO|||
我係電腦白痴一個, sorry ^^

PS: 轉PHP檔個中文係咩?原來我個frontpage 得中文 orz

[ 本帖最後由 dolphin_ice 於 6/5/2008 08:18 PM 編輯 ]
回復

使用道具 舉報

7#
發表於 7/5/2008 01:25 PM | 只看該作者
原帖由 dolphin_ice 於 6/5/2008 16:02 發表
哇! 多謝晒!!

點解2個paste落html都係得一堆code? 唔見有表 oO|||
我係電腦白痴一個, sorry ^^

PS: 轉PHP檔個中文係咩?原來我個frontpage 得中文 orz

有沒有save in ".html" format?
我copy完第一個去notepad再save in ".html"後看到一個form啊


                               
登錄/註冊後可看大圖
回復

使用道具 舉報

8#
發表於 7/5/2008 02:33 PM | 只看該作者
原帖由 dolphin_ice 於 6/5/2008 16:02 發表
哇! 多謝晒!!

點解2個paste落html都係得一堆code? 唔見有表 oO|||
我係電腦白痴一個, sorry ^^

PS: 轉PHP檔個中文係咩?原來我個frontpage 得中文 orz

把以上兩個任何一個要儲存為.php, 再upload上support php 的server

原帖由 fish 於 7/5/2008 13:25 發表

有沒有save in ".html" format?
我copy完第一個去notepad再save in ".html"後看到一個form啊


                               
登錄/註冊後可看大圖


同上
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 加入

本版積分規則

手機版|Archiver|香港寵物小精靈村落

GMT+8, 24/10/2024 11:23 PM , Processed in 0.013072 second(s), 15 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表