Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Set Email

Use this command to set up the email environment for an email sent from Longview Application Framework, including the email address to send the message to. You must set the email properties before you can use the Send Email command.

Note: SMTP authorization and encryption cannot be set using the Set Email command. Your third-party email administrator configures these settings.

You can also use this command to specify an attachment to send with the email. The permitted paths for attachments are determined by the lv_af.cfg file found in the working directory of the lv_af.exe. While events are running, the lv_af.exe will look for the lv_af.cfg in the working directory of the Data Server. For example, C:\Longview\LVCPM\DataServers\LVCPM.

Note: The working directory of the Data Server can be specified in the lvsrvr.cfg file under the WORK_DIRECTORY parameter.

To change the permitted file paths, open the lv_af.cfg file in your preferred text editor, and modify the PERMITTED_ATTACHMENT_PATH statement. There are no path restrictions if the lv_af.cfg file does not exist or if the statement value is blank. Lines in the lv_af.cfg file cannot surpass 4094 characters. Separate multiple paths with a semicolon ( ; ). For example:

PERMITTED_ATTACHMENT_PATH = C:\tmp;C:\lv\source\ApplicationFramework\bin\email;\\jsmith39203\c$\lv\source\ApplicationFramework\bin\49681

By default, emails are sent unecrypted and unauthenticated. To send an ecrypted and authenticated email, use the SET EMAIL CREDENTIALS command. Alternatively, if you wish to separate the credentials from application-defined scripts, you can define the host, port, username and password credentials in the lv_af.cfg file found in the working directory of the lv_af.exe. To specify the credentials, open the lv_af.cfg file in your preferred text editor, and add the SMTP_SERVERHOST, SMTP_SERVERPORT (does not need to be specified if the default port is 25), SMTP_USERNAME and SMTP_PASSWORD statements. For example:

SMTP_SERVERHOST=host

SMTP_SERVERPORT=port

SMTP_USERNAME=username

SMTP_PASSWORD=password

When SMTP_SERVERHOST, SMTP_SERVERPORT, SMTP_USERNAME and SMTP_PASSWORD are specified in the lv_af.cfg, it is equivalent to calling SET EMAIL SERVER and SET EMAIL CREDENTIALS with these parameters. However, if the lv_af.cfg parameters exist and the SET EMAIL SERVER and SET EMAIL CREDENTIALS are also set in the Application Framework procedure document, the credentials specified in SET EMAIL SERVER and SET EMAIL CREDENTIALS take precedence.

Copy

Syntax

SET EMAIL SERVER "Host" [Port]
SET EMAIL SENDER "Email" ["Name"]
SET EMAIL CREDENTIALS "UserName" "Password"
SET EMAIL TO "ToEmail1|ToEmail2|...ToEmail N" ["ToName1|ToName2|...ToNameN"] 
SET EMAIL CC "ccEmail1"|ccEmail2|...ccEmailN" ["ccName1|ccName2|...ccNameN"]
SET EMAIL ATTACHMENT "FileName1|FileName2|...FileNameN"

where:

  • Host is the SMTP server host name.
  • Port is optional and is the port for the SMTP server. The default for this parameter is 25.
  • Email is the sender’s email address. You must specify the sender’s email address.
  • Name is the sender’s name.
  • UserName is the username to use as credentials when SET EMAIL CREDNETIALS is used. SET EMAIL CREDENTIALS is optional and when specified, indicates that encrytption and authentication are required.
  • Password is the password to use as credentials when SET EMAIL CREDENTIALS is used. SET EMAIL CREDENTIALS is optional and when specified, indicates that encrytption and authentication are required.

    Note: To clear the username and password, use empty strings. For example: SET EMAIL CREDENTIALS "" "".

  • ToEmail11ToEmail2|...ToEmail N are the email addresses of the recipients. You must specify at least one recipient.
  • ToName11ToName2|...ToNameN are optional and are the names of the recipients.
  • ccEmail1|ccEmail2|...ccEmailN are optional and are the email addresses to be cc’d.
  • FileName1|FileName2|...FileNameN are optional and are the files to attach to the email, including the file path, in the format C:\...\FileName. If a FileName includes spaces, enclose it in double quotation marks. For example, "C:\My Documents\EmployeeList.txt". If the path contains a dollar sign ( $ ), you must use a variable to store the path. For example,

    SET VARIABLE sAttachments = "\\ourserver123\c$"+"\LongviewCPMAF\Attachments\Attachment1.TXT|\\ourserver123\c$\LongviewCPMAF\Attachements\Attachment1.TXT"

    SET EMAIL ATTACHMENT $sAttachments$

    Separate multiple FileNames with a pipe ( | ).

Note: If the document is in the same location as lv_af.exe, you do not need to specify the path.

Copy

Syntax example

SET EMAIL SERVER "email.server.net" 1300
SET EMAIL SENDER "bsummers@longview.com" "Buffy Summers"
SET EMAIL CREDENTIALS "bsummers" "Password123"
SET EMAIL TO "rgiles@example.com|cchase@example.com|wrosenberg@example.com" "Rupert Giles|Cordelia Chase|Willow Rosenberg"
SET EMAIL CC "xharris@example.com" "Xander Harris"
SET EMAIL ATTACHMENT "weekly_schedule.pdf"
SET EMAIL ATTACHMENT "S:\CompanyShared\employeelist.doc|S:\CompanyShared\StaffPhotos\employeephoto.jpg"

See also

Published:

Set Email

Use this command to set up the email environment for an email sent from Longview Application Framework, including the email address to send the message to. You must set the email properties before you can use the Send Email command.

Note: SMTP authorization and encryption cannot be set using the Set Email command. Your third-party email administrator configures these settings.

You can also use this command to specify an attachment to send with the email. The permitted paths for attachments are determined by the lv_af.cfg file found in the working directory of the lv_af.exe. While events are running, the lv_af.exe will look for the lv_af.cfg in the working directory of the Data Server. For example, C:\Longview\LVCPM\DataServers\LVCPM.

Note: The working directory of the Data Server can be specified in the lvsrvr.cfg file under the WORK_DIRECTORY parameter.

To change the permitted file paths, open the lv_af.cfg file in your preferred text editor, and modify the PERMITTED_ATTACHMENT_PATH statement. There are no path restrictions if the lv_af.cfg file does not exist or if the statement value is blank. Lines in the lv_af.cfg file cannot surpass 4094 characters. Separate multiple paths with a semicolon ( ; ). For example:

PERMITTED_ATTACHMENT_PATH = C:\tmp;C:\lv\source\ApplicationFramework\bin\email;\\jsmith39203\c$\lv\source\ApplicationFramework\bin\49681

By default, emails are sent unecrypted and unauthenticated. To send an ecrypted and authenticated email, use the SET EMAIL CREDENTIALS command. Alternatively, if you wish to separate the credentials from application-defined scripts, you can define the host, port, username and password credentials in the lv_af.cfg file found in the working directory of the lv_af.exe. To specify the credentials, open the lv_af.cfg file in your preferred text editor, and add the SMTP_SERVERHOST, SMTP_SERVERPORT (does not need to be specified if the default port is 25), SMTP_USERNAME and SMTP_PASSWORD statements. For example:

SMTP_SERVERHOST=host

SMTP_SERVERPORT=port

SMTP_USERNAME=username

SMTP_PASSWORD=password

When SMTP_SERVERHOST, SMTP_SERVERPORT, SMTP_USERNAME and SMTP_PASSWORD are specified in the lv_af.cfg, it is equivalent to calling SET EMAIL SERVER and SET EMAIL CREDENTIALS with these parameters. However, if the lv_af.cfg parameters exist and the SET EMAIL SERVER and SET EMAIL CREDENTIALS are also set in the Application Framework procedure document, the credentials specified in SET EMAIL SERVER and SET EMAIL CREDENTIALS take precedence.

Copy

Syntax

SET EMAIL SERVER "Host" [Port]
SET EMAIL SENDER "Email" ["Name"]
SET EMAIL CREDENTIALS "UserName" "Password"
SET EMAIL TO "ToEmail1|ToEmail2|...ToEmail N" ["ToName1|ToName2|...ToNameN"] 
SET EMAIL CC "ccEmail1"|ccEmail2|...ccEmailN" ["ccName1|ccName2|...ccNameN"]
SET EMAIL ATTACHMENT "FileName1|FileName2|...FileNameN"

where:

  • Host is the SMTP server host name.
  • Port is optional and is the port for the SMTP server. The default for this parameter is 25.
  • Email is the sender’s email address. You must specify the sender’s email address.
  • Name is the sender’s name.
  • UserName is the username to use as credentials when SET EMAIL CREDNETIALS is used. SET EMAIL CREDENTIALS is optional and when specified, indicates that encrytption and authentication are required.
  • Password is the password to use as credentials when SET EMAIL CREDENTIALS is used. SET EMAIL CREDENTIALS is optional and when specified, indicates that encrytption and authentication are required.

    Note: To clear the username and password, use empty strings. For example: SET EMAIL CREDENTIALS "" "".

  • ToEmail11ToEmail2|...ToEmail N are the email addresses of the recipients. You must specify at least one recipient.
  • ToName11ToName2|...ToNameN are optional and are the names of the recipients.
  • ccEmail1|ccEmail2|...ccEmailN are optional and are the email addresses to be cc’d.
  • FileName1|FileName2|...FileNameN are optional and are the files to attach to the email, including the file path, in the format C:\...\FileName. If a FileName includes spaces, enclose it in double quotation marks. For example, "C:\My Documents\EmployeeList.txt". If the path contains a dollar sign ( $ ), you must use a variable to store the path. For example,

    SET VARIABLE sAttachments = "\\ourserver123\c$"+"\LongviewCPMAF\Attachments\Attachment1.TXT|\\ourserver123\c$\LongviewCPMAF\Attachements\Attachment1.TXT"

    SET EMAIL ATTACHMENT $sAttachments$

    Separate multiple FileNames with a pipe ( | ).

Note: If the document is in the same location as lv_af.exe, you do not need to specify the path.

Copy

Syntax example

SET EMAIL SERVER "email.server.net" 1300
SET EMAIL SENDER "bsummers@longview.com" "Buffy Summers"
SET EMAIL CREDENTIALS "bsummers" "Password123"
SET EMAIL TO "rgiles@example.com|cchase@example.com|wrosenberg@example.com" "Rupert Giles|Cordelia Chase|Willow Rosenberg"
SET EMAIL CC "xharris@example.com" "Xander Harris"
SET EMAIL ATTACHMENT "weekly_schedule.pdf"
SET EMAIL ATTACHMENT "S:\CompanyShared\employeelist.doc|S:\CompanyShared\StaffPhotos\employeephoto.jpg"

See also

For an optimal Community experience, Please view on Desktop