var data = e.parameter;
var emailAddress = data["Email Address"];
var subject = "Confirmation: Your Request has been Received";
var message = "Hello " + firstName + ",\n\nThank you for submitting a service request. We have received your request and will get back to you shortly.\n\nBest regards,\niAccessAbility";
// Send confirmation email to the user
if (emailAddress) {
try {
MailApp.sendEmail(emailAddress, subject, message);
Logger.log("Email sent to: " + emailAddress);
} catch (error) {
Logger.log("Email sending error: " + error.message);
}
} else {
Logger.log("No email address provided.");
}
// Append form data to submissions sheet
sheet.appendRow([data.Date, data["First Name"], data["Last Name"], data["Phone Number"], data["Email Address"], data.Communication, data.Service]);
// Return success message
return ContentService.createTextOutput("Success").setMimeType(ContentService.MimeType.TEXT);
}< /code>
< /div>
< /div>
< /p>
ниже приведен HTML пользовательская страница формы < /p>
[*]
iAccessAbility
Get to Know the Site!
Checkout some of the iAccessAbility's other pages:
News and Events[/b]
Stay up to date with what iAccessAbility is doing! Events and News Updates >
Recommendations
Get links to apps, services , and products I use: Recommendations - iAccessAbility >
Behind the Vision
Get to know Leah Dykema, the owner behind iAccessAbility: About Leah Dykema >
Frequently Asked Questions
What services do you provide?
iAccessAbility offers tech support, one-on-one training, and a personalized consultant service keeping in mind your budget and needs.
Learn more >
When are you open?
You can contact us at any time and I will get back to you as soon as we can; however, calls are accepted and returned between 10:00 AM and 6:00 PM on weekdays and Saturdays.
How much do you charge for services?
At this time, iAccessAbility services are free since I am a student still learning; however, a set fee will be eventually calculated and posted on the services page.
< /code>
Любая помощь будет оценена!>
Подробнее здесь: https://stackoverflow.com/questions/794 ... -submitter