Skip to content

Toro Cloud Dev Center


EmailFunctions

The Email class contains functions for reading and sending emails.

Here are examples on how to use them:

Sample service showing how to use the `Email` functions

 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 )