learn-to-send-email-via-google-script-html-no-server icon indicating copy to clipboard operation
learn-to-send-email-via-google-script-html-no-server copied to clipboard

Mail is no longer delivered

Open tumise100 opened this issue 2 years ago • 7 comments

I have been using this for my personal website, and I noticed mail are been deliver to email when people use my contact form. It's not functioning at all

tumise100 avatar Mar 15 '23 14:03 tumise100

Hi @tumise100, 👋 Are you able to send email from the email address manually? i.e. using the GMail web interface? ✉️

nelsonic avatar Mar 15 '23 16:03 nelsonic

Yes, I'm able to send out mail from the account

tumise100 avatar Mar 15 '23 17:03 tumise100

Hmm … strange. Google might be blocking the script. Are you able to email yourself using the script? 💭

nelsonic avatar Mar 15 '23 20:03 nelsonic

How do I do that? emailing myself with the script

tumise100 avatar Mar 16 '23 07:03 tumise100

@tumise100 is your script public? It should already be configured to send the email to yourself: https://github.com/dwyl/learn-to-send-email-via-google-script-html-no-server/blob/6b1122f7805dba5bb48150a0ca8d000b12032884/google-apps-script.js#L56 i.e. when the form is submitted, it should send an email to the TO_ADDRESS

nelsonic avatar Mar 16 '23 07:03 nelsonic

Yeah... but not working, when the form is submitted, nothing happens, no mail sent, no mail receive

tumise100 avatar Mar 16 '23 08:03 tumise100

I just setup a test following the tutorial and it worked fine. Have you checked if there is any failed executions for your AppScript? You can check it here (this is the script editor page, when you click the script from the list at https://script.google.com/home or through the Sheets file Extensions -> Apps Script menu): image You can refer to https://developers.google.com/apps-script/guides/support/troubleshooting?hl=en for troubleshooting any error.

But if it seems to be nothing wrong there (and you are sure you didn't consume all the free quota), you can try Redeploying your script as in Step 5 of the tutorial. Don't forget to also update your <form action=""> with the new Web app URL.

cristianofromagio avatar Mar 16 '23 15:03 cristianofromagio