public class EmailService extends Object implements org.pentaho.platform.api.email.IEmailService
| Constructor and Description |
|---|
EmailService()
Constructs an instance of this class using the default settings location as defined by PentahoSystem
|
EmailService(File emailConfigFile)
Constructs an instance of this class using the specified file location as the source of the email configuration
|
| Modifier and Type | Method and Description |
|---|---|
EmailConfiguration |
getEmailConfig()
TODO document
|
boolean |
isValid() |
String |
sendEmailTest(org.pentaho.platform.api.email.IEmailConfiguration emailConfig)
Tests the provided email configuration by sending a test email.
|
void |
setEmailConfig(org.pentaho.platform.api.email.IEmailConfiguration emailConfiguration) |
public EmailService()
throws IllegalArgumentException
IllegalArgumentException - Indicates that the default location for the email configuration file is invalidpublic EmailService(File emailConfigFile) throws IllegalArgumentException
emailConfigFile - the file reference to the email configurationIllegalArgumentException - indicates the argument is either null or references a location which is invalid (the parent folder of the
specified file doesn't exist)public void setEmailConfig(org.pentaho.platform.api.email.IEmailConfiguration emailConfiguration)
setEmailConfig in interface org.pentaho.platform.api.email.IEmailServicepublic EmailConfiguration getEmailConfig()
getEmailConfig in interface org.pentaho.platform.api.email.IEmailServicepublic String sendEmailTest(org.pentaho.platform.api.email.IEmailConfiguration emailConfig)
sendEmailTest in interface org.pentaho.platform.api.email.IEmailServiceemailConfig - the email configuration to testException - indicates an error running the test (as in an invalid configuration)public boolean isValid()
isValid in interface org.pentaho.platform.api.email.IEmailService