Skip to content

Overview

Development

Overview

IDEs

API Explorer

EmailMethods

The EmailMethods class contains one-liners for reading and sending emails.

Here are examples on how to use them:

Sample Gloop service showing how to use the EmailMethods one-liners

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 String emailBody = 'Hello, world'
 def emailAttachments = ...
 emailBody.sendEmail( 'smtp',
                      'login@gmail.com',
                      'password',
                      'smtp.gmail.com',
                      587,
                      'fromMe@gmail.com',
                      'toYou@gmail.com',
                      [ 'cc1@gmail.com', 'cc2@gmail.com' ],
                      null,
                      'subject here',
                      emailAttachments )