sendEmail gives an exception

385 views
Skip to first unread message

Petr Sedlacek

unread,
Nov 30, 2020, 6:59:52 AM11/30/20
to Google Apps Script Community
Hello,

any idea what is going on?


function myFunction7()
{
 
var message=
 
{
 to
: "sed...@gmail.com",
 subject
:"testing message",
 htmlBody
:"<b>Bold</b>"
 
}
 
Logger.log(message);
 
GmailApp.sendEmail(message);
}

Results in

Exception: The parameters (String) don't match the method signature for GmailApp.sendEmail.
    at myFunction7(tst:66:12)

Thank you!

Petr


Adam Morris

unread,
Nov 30, 2020, 7:40:50 AM11/30/20
to google-apps-sc...@googlegroups.com
Did you mean to say MailApp? Instead of Gmail app? 

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/1e73d9d5-3cc7-43f1-963a-dabbb78bc758o%40googlegroups.com.
--

Petr Sedlacek

unread,
Nov 30, 2020, 7:45:53 AM11/30/20
to Google Apps Script Community
Hmm, that's it.
I can't feel more stupid at this moment.

Thank you!
Petr


On Monday, November 30, 2020 at 1:40:50 PM UTC+1, Adam Morris wrote:
Did you mean to say MailApp? Instead of Gmail app? 
On Mon, Nov 30, 2020 at 7:59 PM 'Petr Sedlacek' via Google Apps Script Community <google-apps-sc...@googlegroups.com> wrote:
Hello,

any idea what is going on?


function myFunction7()
{
 
var message=
 
{
 to
: "sed...@gmail.com",
 subject
:"testing message",
 htmlBody
:"<b>Bold</b>"
 
}
 
Logger.log(message);
 
GmailApp.sendEmail(message);
}

Results in

Exception: The parameters (String) don't match the method signature for GmailApp.sendEmail.
    at myFunction7(tst:66:12)

Thank you!

Petr


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

Adam Morris

unread,
Nov 30, 2020, 8:11:32 AM11/30/20
to google-apps-sc...@googlegroups.com
Just think of it as an achievement unlocked!

On Mon, Nov 30, 2020 at 8:45 PM 'Petr Sedlacek' via Google Apps Script Community <google-apps-sc...@googlegroups.com> wrote:
Hmm, that's it.
I can't feel more stupid at this moment.

Thank you!
Petr

On Monday, November 30, 2020 at 1:40:50 PM UTC+1, Adam Morris wrote:
Did you mean to say MailApp? Instead of Gmail app? 
On Mon, Nov 30, 2020 at 7:59 PM 'Petr Sedlacek' via Google Apps Script Community <google-apps-sc...@googlegroups.com> wrote:
Hello,

any idea what is going on?


function myFunction7()
{
 
var message=
 
{
 to
: "sed...@gmail.com",
 subject
:"testing message",
 htmlBody
:"<b>Bold</b>"
 
}
 
Logger.log(message);
 
GmailApp.sendEmail(message);
}

Results in

Exception: The parameters (String) don't match the method signature for GmailApp.sendEmail.
    at myFunction7(tst:66:12)

Thank you!

Petr


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/f96fec3a-2d06-457a-9383-14a7eece6a81o%40googlegroups.com.
--
Reply all
Reply to author
Forward
0 new messages