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) |
protected void |
setEmailConfigFile(File emailConfigFile)
Validates and sets the email configuration file to the specified value.
|
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.IEmailService
public EmailConfiguration getEmailConfig()
getEmailConfig
in interface org.pentaho.platform.api.email.IEmailService
public String sendEmailTest(org.pentaho.platform.api.email.IEmailConfiguration emailConfig)
sendEmailTest
in interface org.pentaho.platform.api.email.IEmailService
emailConfig
- the email configuration to testException
- indicates an error running the test (as in an invalid configuration)protected void setEmailConfigFile(File emailConfigFile) throws IllegalArgumentException
emailConfigFile
- the email configuration file to useIllegalArgumentException
- indicates that the provided value is invalid (the value is null or the parent folder does not exist)public boolean isValid()
isValid
in interface org.pentaho.platform.api.email.IEmailService
Copyright © 2021 Hitachi Vantara. All rights reserved.