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

Send Email

Use this command to send an email from Longview Application Framework.

Note: You must set up the email environment before you can use the Send Email command. For more information, see Set Email.

Copy

Syntax

SEND EMAIL "Subject" Document                                

where:

  • Subject is the subject to display in the email.
  • Document is the email content file. The file can be in memory or on disk. To send an email as HTML, the file suffix must be htm or html. If you’re using Application Framework to generate the contents of an HTML file, you may need to use HTML character entities for special characters, including double quotation marks ( &quot; ) and the appropriate tags for formatting elements such as carriage returns ( <br> ).
Copy

Syntaxexample

SEND EMAIL "Hello World" c:\Users\Lview\Documents\Sample_content_file
SEND EMAIL "Notice to Employees" c:\DJO\Documents\Notices\Employee_notice.html    

HTML file example

You can use .html to format your email with links and custom fonts, colors, and spacing. For example, you can format your email like this:

Sample email

To format the above email, you could use .html similar to the following in your email document:

Copy

Sample email

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<style type="text/css">
body {color:#333333; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; margin-top: 10px; overflow:auto;}
h1 {color:#3d6e9f; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font-weight:bold; margin-top: 0px; margin-bottom: 0px;}
h2 {color:#333333; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight:bold; margin-top: 12px; margin-bottom: 0px;}
.pass {color:#008000; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight: bold; margin-top: 10px; margin-bottom: 0px;}
.fail {color:#B22222; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight: bold; margin-top: 10px; margin-bottom: 0px;}
p {margin-top: 6px; margin-bottom: 0px;}
</style>
</head>
<body>
<h2 class="fail">Data Validation Failed</h2>
<p>The Trial Balance for Toronto is out of balance. <br>
Please <a href="http://webserver/LVCPMDEV" target="_blank">sign on</a> to the Longview system to view and remediate errors.</p>
<br>
<p>If you have received this email in error please contact the <a href="mailto:LVAdmin@abc.com?Subject=Data Validation Email Notification" target="_top">System Administrator</a>.</p>
</body>
</html>

See also

Published:

Send Email

Use this command to send an email from Longview Application Framework.

Note: You must set up the email environment before you can use the Send Email command. For more information, see Set Email.

Copy

Syntax

SEND EMAIL "Subject" Document                                

where:

  • Subject is the subject to display in the email.
  • Document is the email content file. The file can be in memory or on disk. To send an email as HTML, the file suffix must be htm or html. If you’re using Application Framework to generate the contents of an HTML file, you may need to use HTML character entities for special characters, including double quotation marks ( &quot; ) and the appropriate tags for formatting elements such as carriage returns ( <br> ).
Copy

Syntaxexample

SEND EMAIL "Hello World" c:\Users\Lview\Documents\Sample_content_file
SEND EMAIL "Notice to Employees" c:\DJO\Documents\Notices\Employee_notice.html    

HTML file example

You can use .html to format your email with links and custom fonts, colors, and spacing. For example, you can format your email like this:

Sample email

To format the above email, you could use .html similar to the following in your email document:

Copy

Sample email

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<style type="text/css">
body {color:#333333; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; margin-top: 10px; overflow:auto;}
h1 {color:#3d6e9f; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font-weight:bold; margin-top: 0px; margin-bottom: 0px;}
h2 {color:#333333; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight:bold; margin-top: 12px; margin-bottom: 0px;}
.pass {color:#008000; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight: bold; margin-top: 10px; margin-bottom: 0px;}
.fail {color:#B22222; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; font-weight: bold; margin-top: 10px; margin-bottom: 0px;}
p {margin-top: 6px; margin-bottom: 0px;}
</style>
</head>
<body>
<h2 class="fail">Data Validation Failed</h2>
<p>The Trial Balance for Toronto is out of balance. <br>
Please <a href="http://webserver/LVCPMDEV" target="_blank">sign on</a> to the Longview system to view and remediate errors.</p>
<br>
<p>If you have received this email in error please contact the <a href="mailto:LVAdmin@abc.com?Subject=Data Validation Email Notification" target="_top">System Administrator</a>.</p>
</body>
</html>

See also

For an optimal Community experience, Please view on Desktop