Class AbstractNetUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities
- Direct Known Subclasses:
- ClientNetUtilities
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract void_sendEmail(String smtpSettingsName, String from, String subject, String body, boolean html, String[] recipients, String[] ccRecipients, String[] bccRecipients, String[] attachNamesArg, byte[][] attachBytesArg, int timeout, int retries, String priority, String[] replyTo) Sends an email with or without authorization and attachments, depending an what arguments are null.protected abstract void_sendEmail(String smtp, String from, String subject, String body, boolean html, String[] recips, String username, String password, String priority, String[] attachNamesArg, byte[][] attachBytesArg, int timeout, String[] replyTo) Deprecated.protected StringgenerateEmailContentType(boolean isHtml) Generates the email Content-Type header with character encoding.static Stringstatic StringgetRemoteServers(Boolean getRunningOnly) Returns a list of Gateway Network servers that are visible on the local Gateway.getRemoteServers(org.python.core.PyObject[] values, String[] keywords) httpClient(org.python.core.PyObject[] pyArgs, String[] keywords) static StringhttpDelete(org.python.core.PyObject[] pyArgs, String[] keywords) static Stringstatic Stringstatic Stringstatic Stringstatic StringvoidsendAuthEmail(String smtp, String from, String subject, String body, boolean html, String[] recips, String username, String password) voidsendAuthEmail(String smtp, String from, String subject, String body, boolean html, String[] recips, String username, String password, String[] attachNamesArg, byte[][] attachBytesArg) voidsendAuthEmail(String smtp, String from, String subject, String body, boolean html, String[] recips, String username, String password, String[] attachNamesArg, byte[][] attachBytesArg, int timeout) voidsmtpProfile added in ver 7.8.
- 
Field Details- 
commonContext
 
- 
- 
Constructor Details- 
AbstractNetUtilities
 
- 
- 
Method Details- 
sendAuthEmail
- 
sendAuthEmail
- 
sendAuthEmail
- 
sendEmailsmtpProfile added in ver 7.8. If the user passes in a smtpProfile name then smtp, timeout, username and password will be ignored, even if they are passed in. Those keywords are only retained for backwards compatibility with existing scripts.Also added in 7.8.0 is cc and bcc 
- 
_sendEmail@Deprecated protected abstract void _sendEmail(String smtp, String from, String subject, String body, boolean html, String[] recips, String username, String password, String priority, String[] attachNamesArg, byte[][] attachBytesArg, int timeout, String[] replyTo) Deprecated.Sends an email with or without authorization and attachments, depending an what arguments are null. This method is retained for backwards compatibility- Parameters:
- smtp- Address of the mail server, for example, mail.mycompany.com
- from- An email address to use as the email's from address. Also the return address.
- subject- The subject of the email.
- body- The body of the email.
- html- A boolean (0/1) indicating whether or not the body is HTML formatted.
- recips- A python sequence of recipient email addresses.
- replyTo- A python sequence of reply-to email addresses.
 
- 
_sendEmailprotected abstract void _sendEmail(String smtpSettingsName, String from, String subject, String body, boolean html, String[] recipients, String[] ccRecipients, String[] bccRecipients, String[] attachNamesArg, byte[][] attachBytesArg, int timeout, int retries, String priority, String[] replyTo) Sends an email with or without authorization and attachments, depending an what arguments are null.- Parameters:
- smtpSettingsName- Name of an existing smtpSettings record to use
- from- An email address to use as the email's from address. Also the return address.
- subject- The subject of the email.
- body- The body of the email.
- html- A boolean (0/1) indicating whether or not the body is HTML formatted.
- recipients- A python sequence of recipient email addresses.
- attachNamesArg- List of attachment names
- attachBytesArg- List of attachment data, must be the same length as the names
- replyTo- A python sequence of reply-to email addresses.
- Since:
- 7.8.0
 
- 
getIpAddress
- 
getHostName
- 
httpGet
- 
httpPost
- 
httpPost
- 
httpPut
- 
httpPut
- 
httpDelete
- 
httpClientpublic JythonHttpClient httpClient(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception - Throws:
- Exception
 
- 
getRemoteServerspublic List<String> getRemoteServers(org.python.core.PyObject[] values, String[] keywords) throws Exception - Throws:
- Exception
 
- 
getRemoteServersReturns a list of Gateway Network servers that are visible on the local Gateway.- Parameters:
- getRunningOnly- set to true to indicate that only currently reachable servers should be returned
- Returns:
- a List of Strings representing ServerIds
- Throws:
- Exception
 
- 
generateEmailContentTypeGenerates the email Content-Type header with character encoding. Tries UTF-8 but if the system does not support this encoding then it falls back to the system default encoding usingCharset.defaultCharset()- Parameters:
- isHtml- Flag which indicates if this email content is HTML (set) or Plain Text (unset).
- Returns:
- The email Content-Type header including the character encoding.
 
 
-