dwyl/learn-to-send-email-via-google-script-html-no-server

Subject text change

genesisoliva opened this issue · 5 comments

I have tried to change for what subject would say but it doesn’t change whenever I do a test

Hi @genesisoliva what code have you attempted to change? If you can give us more detail we might be able to help. 👍

var sendEmailTo = (typeof TO_ADDRESS !== "undefined") ? TO_ADDRESS : mailData.formGoogleSendEmail;

// send email if to address is set
if (sendEmailTo) {
  MailApp.sendEmail({
    to: String(sendEmailTo),
    **subject: "Personality Form Submitted",**
    replyTo: String(mailData.email),
    htmlBody: formatMailBody(mailData, dataOrder)
  });
}

So I changed the subject to say “Personality form submitted” but when I test the code it prints out contact form submitted. Would you like a screenshot of my whole code?

@genesisoliva did you remember to publish the new version of the script so the new version will be used?

Thank you so much!

@genesisoliva glad you got it working. ☀️