2011-01-11 33 views
2

我知道Google Spreadsheets包含一個包含MailApp.sendEmail函數的羣發郵件選項,但據我所知,它只能在打開表單或手動點擊「跑」。用Google Forms/Spreadsheets發送確認電子郵件

我有一個Google表單,其中包含一個用於放置他們電子郵件地址的區域。是否有簡單的解決方案將此數據發送到Google電子表格並將其作爲確認發送到指定的電子郵件地址?如果我能以某種方式將MailApp.sendEmail合併到表單中,而不是電子表格中(這將在事實和手動之後,而不是即時和自動),那將是非常好的。

另外,請注意,我將張貼與jQuery。

任何想法?

回答

0

解決方法是使用Javascript進行多項操作。 我在http://www.codeproject.com/KB/scripting/multiact.aspx上發現了這個。下面的代碼:

<form name=Form1 action= "login1.php" method=post> 
Username <input type="text" name="username"> 
Password <input type="password" name="password"> 
<input type="submit" value="Send" name="button1" 
        onclick="return OnButton1();"> 

<script language="javascript"> 
<!-- 
function OnButton1() 
{ 
    document.Form1.action = "login2.php" // First target 

    document.Form1.target = "iframe1"; // Open in a iframe 

    document.Form1.submit();  // Submit the page 

    document.Form1.action = "page3.php" // Second target 

    document.Form1.target = "iframe2"; // Open in a iframe 

    document.Form1.submit();  // Submit the page 

    return true; 
} 
--> 
</script> 

<div style="visibility:hidden"> 
<iframe NAME="iframe1" WIDTH="40" HEIGHT="40"></iframe> 
<iframe NAME="iframe2" WIDTH="40" HEIGHT="40"></iframe> 
</div> 

一個I幀可以指向谷歌的形式,並且可以指向自己的PHP文件,可以處理的數據(即發送電子郵件的人)。這樣做也可以讓您處理「謝謝」頁面,而不是將它們發送到Google的謝謝頁面。

相關問題