Send Mail Status 401

Hello
i tried to use this script from Ct Tricks

https://cttricks.com/2021/04/14/gmail-app-in-thunkable-x/

but fails to send any mail, returning the code 401, and not 200 as described in the guide
I have granted permissions to the google account for sending emails

am I doing something wrong?


1 Like

When you deployed the Google Apps Script, did you choose the type as Web app and the access to Anyone?

image

You have to choose this option to work from the Web API.

I had also done this test.
I have done everything again and now by changing this parameter, it works !!!
can e-mails other than Gmail also be used?
is it possible to change the sending email?

1 Like

Hi
@muneer

how can i send 2 mails at the same time, with the blocks arranged like in the picture I posted it is not working!!!

image

I can only make it works by adding both mails in the app script

Can you suggest any solution?

1 Like

Do you want to send two emails, each to a different recipient or do you want to send one email to more than one recipient?

The image you’ve shown is for a single email sent to two recipients.

I think you need to use a comma ( , ) instead of a semi-colon ( ; ) to separate addresses.

(Source: Class GmailApp  |  Apps Script  |  Google Developers)

3 Likes

using comma ( , ) works, thanks!!!

3 Likes