public final class EmailMethods extends Object
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
readEmail(String protocol,
String login,
String password,
String host,
int port,
String folder,
boolean delete,
boolean debug) |
static io.toro.gloop.object.property.GloopModel |
sendEmail(String protocol,
String login,
String password,
String server,
int port,
String from,
List<io.toro.gloop.object.property.GloopModel> to,
List<io.toro.gloop.object.property.GloopModel> cc,
List<io.toro.gloop.object.property.GloopModel> bcc,
String subject,
boolean isHtml,
String body,
List attachments,
List<io.toro.gloop.object.property.GloopModel> headers) |
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
Object cc,
Object bcc,
String subject)
One-Liner method that sends an email
|
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
Object cc,
Object bcc,
String subject,
List<DataSource> attachments)
One-Liner method that sends an email
|
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
Object cc,
String subject)
One-Liner method that sends an email
|
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
Object cc,
String subject,
List<DataSource> attachments)
One-Liner method that sends an email
|
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
String subject)
One-Liner method that sends an email
|
static String |
sendEmail(String body,
String protocol,
String login,
String password,
String server,
int port,
String from,
Object to,
String subject,
List<DataSource> attachments)
One-Liner method that sends an email
|
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, String subject) throws ToroException
One-Liner method that sends an email
String emailBody = 'hello world' emailBody.sendEmail( 'smtp', 'login@gmail.com', 'password', 'smtp.gmail.com', 587, 'fromMe@gmail.com', 'toYou@gmail.com', 'subject here' )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)subject
- email subjectToroException
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, String subject, List<DataSource> attachments) throws ToroException
One-Liner method that sends an email
String emailBody = 'hello world' def emailAttachments = ... emailBody.sendEmail( 'smtp', 'login@gmail.com', 'password', 'smtp.gmail.com', 587, 'fromMe@gmail.com', 'toYou@gmail.com', 'subject here', emailAttachments )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)subject
- email subjectattachments
- List of email attachments - optionalToroException
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, Object cc, String subject) throws ToroException
One-Liner method that sends an email
String emailBody = 'hello world' 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' )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)cc
- cc address (can be String, String[], or Collection<String>) - optionalsubject
- email subjectToroException
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, Object cc, String subject, List<DataSource> attachments) throws ToroException
One-Liner method that sends an email
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' ], 'subject here', emailAttachments )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)cc
- cc address (can be String, String[], or Collection<String>) - optionalsubject
- email subjectattachments
- List of email attachments - optionalToroException
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, Object cc, Object bcc, String subject) throws ToroException
One-Liner method that sends an email
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' )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)cc
- cc address (can be String, String[], or Collection<String>) - optionalbcc
- bcc address (can be String, String[], or Collection<String>) - optionalsubject
- email subjectToroException
public static String sendEmail(String body, String protocol, String login, String password, String server, int port, String from, Object to, Object cc, Object bcc, String subject, List<DataSource> attachments) throws ToroException
One-Liner method that sends an email
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 )
body
- the body of the emailprotocol
- protocol of the email server ( smtp / smtps )login
- email server loginpassword
- email server passwordserver
- email server hostnameport
- email server port numberfrom
- from addressto
- to address (can be String, String[], or Collection<String>)cc
- cc address (can be String, String[], or Collection<String>) - optionalbcc
- bcc address (can be String, String[], or Collection<String>) - optionalsubject
- email subjectattachments
- List of email attachments - optionalToroException
@GloopObjectParameter(value="mailMetadata{\n mailMetadata#io.toro.martini.email.MailMetadata{\n }\n}") public static io.toro.gloop.object.property.GloopModel sendEmail(@GloopParameter(choices={"smtp","smtps"},allowNull=false,allowOtherValues=true) String protocol, String login, String password, @GloopParameter(choices={"smtp.gmail.com","smtp.mail.yahoo.com","smtp-mail.outlook.com"},allowOtherValues=true,allowNull=false) String server, @GloopParameter(choices={"25","465","587"},allowOtherValues=true) int port, @GloopParameter(allowNull=false) String from, @GloopObjectParameter(value="to#io.toro.martini.email.Address[]{\n}") List<io.toro.gloop.object.property.GloopModel> to, @GloopObjectParameter(value="cc#io.toro.martini.email.Address[]{\n}") List<io.toro.gloop.object.property.GloopModel> cc, @GloopObjectParameter(value="bcc#io.toro.martini.email.Address[]{\n}") List<io.toro.gloop.object.property.GloopModel> bcc, @GloopParameter(allowNull=false) String subject, @GloopParameter(defaultValue="false") boolean isHtml, String body, @GloopObjectParameter(value="attachments#io.toro.martini.email.DataSource[]{\n}") List attachments, @GloopObjectParameter(value="headers#io.toro.martini.email.Header[]{\n}") List<io.toro.gloop.object.property.GloopModel> headers) throws ToroException
ToroException
@GloopObjectParameter(value="output{\nmessages#io.toro.martini.email.Message[]{\n}\n}") public static io.toro.gloop.object.property.GloopModel readEmail(@GloopParameter(choices={"imap","imaps","pop3","pop3s"},allowNull=false) String protocol, @GloopParameter(allowNull=false) String login, @GloopParameter String password, @GloopParameter(choices={"imap.gmail.com","pop.gmail.com","imap-mail.outlook.com","pop3.live.com","imap.mail.yahoo.com","pop.mail.yahoo.com"},allowNull=false,allowOtherValues=true) String host, @GloopParameter(choices={"993","995"},allowOtherValues=true) int port, @GloopParameter(choices="INBOX",allowOtherValues=true) String folder, @GloopParameter(defaultValue="false") boolean delete, @GloopParameter(defaultValue="false") boolean debug) throws ToroException
ToroException
Copyright © 2019. All rights reserved.