Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Javascript functions in Google Spreadsheets

10:25 pm on Feb 22, 2013 (gmt 0)

New User

joined:Feb 22, 2013
posts: 1
votes: 0


Currently, all of my form submissions from my website are creating a copy of the information submitted and posting in on spreadsheets in Google Docs as well as forwarding the information to my specified email. When I open the form submissions that were received in my email, the from and/or reply to address contains my gmail email. I would prefer that the from and/or reply to address contain the email of the for submitter in order to reply to the appropriate email. The following script is contained in my Google spreadsheets. Your support in resolving this issue is greatly appreciated.

function sendEmail() {
var formSheet = SpreadsheetApp.getActiveSheet();
var firstRow = 2; //Skip a row for column labels
var lastForm = formSheet.getLastRow();
var lastCol = formSheet.getLastColumn();
var flagCol = null;
var subject = formSheet.getName() + " Form";
var mailTo = "";
var collaborators = SpreadsheetApp.getActiveSpreadsheet().getCollaborators();

GmailApp.sendEmail('ryan.potter@promedeq.com', subject + formVals[1], message, {"htmlBody": html});
form.getCell(1, flagCol+1).setValue(true);
SpreadsheetApp.flush(); // Make sure the cell is updated right away in case the script is interrupted

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members