Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Email subject and sender name option#404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ririko5834 wants to merge2 commits intodwyl:master
base:master
Choose a base branch
Loading
fromririko5834:patch-1
Open

Email subject and sender name option#404

ririko5834 wants to merge2 commits intodwyl:masterfromririko5834:patch-1

Conversation

ririko5834
Copy link

This feature adds option to set email subject and email sender name

@@ -59,7 +59,8 @@ function doPost(e) {
if (sendEmailTo) {
MailApp.sendEmail({
to: String(sendEmailTo),
subject: "Contact form submitted",
name: String(e.parameters.formGoogleEmailSender) || "Contact Form",
subject: String(e.parameters.formGoogleEmailSubject) || "Contact form submitted",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I believe these|| ... checks won't get hit in all cases.

If the parameters are null or undefined, (like if someone just updates the backend script here or doesn't give these parameters), then you would end up withString(undefined) = 'undefined' which is not falsey.

It may be worth setting the name / subject above and consider usingmailData and/or.toString() when the field is present/truthy.

nelsonic reacted with thumbs up emoji
@@ -44,6 +44,8 @@
// add form-specific values into the data
formData.formDataNameOrder = JSON.stringify(fields);
formData.formGoogleSheetName = form.dataset.sheet || "responses"; // default sheet name
formData.formGoogleEmailSubject = form.dataset.subject || "Contact form was submitted"; //default email subject
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

is it expected that we set the defaults here, or would we want to have a default like the custom email option below?

nitpick: the comment at the end matches L46, but I think it could be cleaner code to consider changing the variable names here to those, if those are better descriptions than what we have as variables in the code.

what do you think?

@mckennapsean
Copy link
Collaborator

@ririko5834 -- did you have interest in addressing the comments posted here to get this PR merged? or would you prefer we take it from here? :) thanks for your contributions so far!!

nelsonic reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mckennapseanmckennapseanmckennapsean left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ririko5834@mckennapsean

[8]ページ先頭

©2009-2025 Movatter.jp