The Email script command can be used to send an alert, which can be directed to any email destination (for example, to a smartphone via it's gmail).
The Email script command can be configured to communicate with an smtp outbox using any standard protocol or port. The configurations can be saved in program preferences, or configured on the fly using associated commands bound to the email script command.
The emailed subject and message can likewise be built by script to provide meaningful alert information from a 24/7/365 running script. The email destination is likewise controllable thru script such that diferent alert messages could be directed to programatically determined addresses.
Syntax: | Comment | ||||
Example: | ![]() |
Send an email | |||
Associated command may be bound to Email to define the smtp destination, protocol, port, and sending mail credentials. All these settings can be set as program preferences to preset choices without the need for script command. | |||||
Example: | ![]() |
SMTPAddress | = | smtp.domain.com | Identify the SMTP server address |
![]() |
SMTPAuthentication | = | STARTTLS | Select between PlainText, STARTTLS, or SSL_TLS | |
![]() |
SMTPPort | = | 587 | Select the port for the SMTP server | |
![]() |
EmailSource | = | mymailbox@domain.com | Identify the email source, which may be required for sending authentication | |
![]() |
SMTPUsername | = | myusername | Username for SMTP sendmail authentication | |
![]() |
SMTPPassword | = | mypassword | Password for SMTP sendmail authentication | |
![]() |
Send an email | ||||
Associated command may be bound to Email to define the destination address, and subject line. These settings can ALSO be preset into program preferences should one preset value serve your purposes. | |||||
Example: | ![]() |
EmailDestination | = | destinationmailbox@domain.com | Identify the destination address |
![]() |
EmailSubject | = | "This is a ScanEngine Explorer message" | Give the email a subject | |
![]() |
Send an email | ||||
Beyond everything that can be preset into preferences, the script must minimally define the body message to be email, which can also be scripted with associated commands. | |||||
Example: | ![]() |
EmailContents | = | "This message is sent from a ScanEngine Explorer script." | Initialize the email body |
![]() |
EmailContents | += | "Script can add more lines as desired" | Add lines to the body as needed | |
![]() |
Send an email |
Notes: