0

how to send custom html automated email once when google form is submitted? I want to have my company logo on top and a border around the email. Please Help!

2 Answers 2

1

My guess is that you got negative points because your question is so broad and apparently you made absolutely no effort to do it yourself. But hey, I feel your pain, because I went through the same.

I am assuming you have already figured out how to send an email with the form submitted data using the on form submit trigger. I am no expert, but a good starting point to get it to send in html would be to design your email with an html/css designer and make it look exactly how you want it, then copy the code as the body variable in your script:

var messageBody = '<html><body style="border:1px solid black"><img src="path-to-logo/logo.jpg" /><h1>Heading</h1><p>You submitted:</p><p>'+[form data]+'.</p></body></html>';

And then send the email using htmlBody as suggested by eggyal. Worked for me.

Sign up to request clarification or add additional context in comments.

1 Comment

and also have a look at some html reference site, it has some tutorials and examples as well.
0

Set the htmlBody advanced argument to MailApp.sendEmail().

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.