MODE |
This used to just contant a single value (1-4), but with the introduction of MODE 5,
MODE can now contains a lot of information for multiple recipients, E-mail subject,
the extention to append to the output file, and a complex E-mail message.
Field |
Description |
<1> |
"5" - After ripping out the data from the other fields, MODE is re-set back to "5" for backward compatability.
If MODE is not "5", previous logic is used and the enhancements are ignored.
|
<2> |
The subject of the E-mail
This will automatically be appended with the account name
|
<3> |
The recipient(s) of the E-mail.
Recipient logic...
|
<4> |
Currently, this is a boolean test (i.e. null or zero = false, anything else = true)
True indicates that there is a file that should be attached as an E-mail or saved to the user's H: drive.
|
<4,2> |
If this value is not null, then the output file will be re-named to this value, plus the
extention (if supplied) in field 5 (see below).
The value will be trimmed, unacceptable characters removed, and spaces changed to underscores.
|
<4,3> |
If this value is not null, then this triggers the software to write the extracted file to a SAMBA drive.
At this time, the value MUST be "//mbdata2/shared".
|
<4,4> |
This is the directory on the shared drive (see above) where the file will be written.
If it is null, then "AVANTEODS-EXTRACT" will be used.
|
<4,5> |
This is the login and password needed to access the drive.
If it is null, a default is used.
|
<4,6> |
When a seq file is built (MODE 1), it will have the name of "TEMP.":port#.
If a value is passed in MODE<4,6> (generally a number), an underscore and this value will be
appended to the file name.
This is only valid for seq file,
but must be used for ALL MODES!
Note that a zero or null will not append anything to the seq file name.
Ex: if a user is on port 22 and a seq # of 5 is passed, this would build a
seq file name of TEMP.22_5.
|
<5> |
The extention that should be appended to the extracted data file (usually "xls").
If <4> is false, this field is ignored.
If this field is null, it will default to ".txt"
It is smart enough to add the period as needed (i.e. "xls" becomes ".xls").
|
Text Format |
HTML Format |
<6+> |
Any free form text that is wanted in the E-mail.
Each field (and multi-value) is a different paragraph in the E-mail body.
If no text is supplied, a generic one will be used.
If the attachment is moved to the user user's H: drive, additional verbage will be added to indicate this.
A footer will always be appended indicating the E-mail is system generated.
This will use the Unix mailx command to send the E-mail.
|
<6> |
Any free form text that is wanted in the E-mail.
Each multi-value is a different paragraph in the E-mail body.
If no text is supplied, a generic one will be used.
If the attachment is moved to the user user's H: drive, additional verbage will be added to indicate this.
A footer will always be appended indicating the E-mail is system generated.
HTML tags are acceptable, and if used, the E-mail will reflect these.
Note that new lines in the E-mail must be distinguished with the HTML break command
Note that the MIME code will be added automatically as long as the message
contains HTML tags.
This will use the Unix sendmail command to send the E-mail.
|
|
|
<7> |
The Carbon Copied recipient(s) of the E-mail.
This uses the same logic as
Recipient logic...
|
|
|
<8> |
The Blind Carbon Copied recipient(s) of the E-mail.
This uses the same logic as
Recipient logic...
|
|
|
<9> |
Priority - 1 or "H" sets the email to high priority
|
|
|
<10> |
Phantom GUID - used by ePortal
|
|
|
<11> |
Skip the mapped logic to always send an attachment (do not write to O: drive)
|
|
|
<12> |
Force the "sent from" value to this value
|
|
|
<13> |
Force the user id to this value
|
|
|
<20> |
The process id to flag as completed (Bruce's logic)
|
|
Notes |
Recipient logic is determined as follows in this order:
If the realm is not LIVE, recipients = ""
If recipients = "", recipients = @LOGNAME
If "IT" is one of the recipients, replace "IT" with IT staff ids
If any recipient is in SYSTBL, replace that value with the values in SYSTBL
UPCASE recipients
Remove blanks and dups from list
Flag and remove inactive Avante users
If recipients = "", recipients = @LOGNAME
Test if mapped (only works for a single recipient)
For each recipient that does not contain "@", append "@DAYSUP.COM"
|
Logic for moving file to the H: drive:
1) There must only be a single recipient
2) The recipient is the user running the program
3) The user has a mapped.txt file in their Unix home direcorty
Send an E-mail to the recipients.
This E-mail will reference any attachments, files moved to their home directory, or moved to a shared
SAMBA drive.
If any of the original recipients were removed because they are inactive Avante users, a 2nd
E-mail will be sent to the IT group indicating that these users/groups must be corrected.
|
HTML in the E-mail body
The latest version of the E-mailer (SYSS9002.1) will accept HTML tags.
This will allow us to make much more visually pleasing E-mails for the users.
This version will also allow us to send the E-mail to Carbon Copied recipients and/or Blind Carbon Copied recipients.
However, the format of what is passed in MODE has changed (though it is still backward compatable).
The prior version put the body of the E-mail in fields 6 and higher.
The new version puts the body of the E-mail in field 6 as multi-values.
To use HTML tags, you must do one of the following (col 1 or col 2):
|
Long-hand version (not recommended)
|
Standardd version (highly recommended)
|
The E-mail message must begin with:
<html>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<head>
</head>
(stuff in red is optional CSS code, but gives more control - there are many other styles)
<style type='text/css'>
body, table, tr, td
{
font-family:verdana
font-size:12px;
color:navy;
background-color:FFFFCC;
}
</style>
<body>
|
$INCLUDE EPORTAL.BP HTML.DEFAULTS
$INCLUDE EPORTAL.BP HTML.TOP
If you wish to use no-standard colors, simply re-define them betrween these two lines.
|
The body of the E-mail goes here.
Use HTML tags normally.
This includes (but is not limited to):
fonts, colors, tables, hyperlinks, images, bold
italics, underlines, breaks, horizontal lines, paragraphs, etc...
|
Add your message the variable EMAIL.BODY |
The E-mail message must end with:
</body>
</html>
|
$INCLUDE EPORTAL.BP HTML.TOP |
The E-mailer program will make a copy of the entire message in upper case,
then look for "</HTML>" in the message.
If found, it will use the new HTML logic, otherwise it will default to the plain text logic.
If the HTML logic is used, there is a lot more code that is wrapped around the E-mail message.
However, this is done automatically, so the programmer does not need to worry about this.
Creating E-mails using HTML will require slightly more coding on the programmer's part,
however the end result can be strikingly more appealing.
Note that if you do not use HTML tags, you can put the body of the E-mail in either fields 6+ or only in field 6 (as multi-values).
For ease of maintenance, it is recommended that the programmer build the E-mail in a seperate varible,
then load that variable into MODE<6>.
Also, build it dynamically (ex: EMAIL.BODY<1,-1> = "blah blah blah"),
not static (ex. EMAIL.BODY<1,5> = "blah blah blah").
This will make changing the message much easier.
Remember that in HTML, multiple spaces are "trimmed". If you want to use column formatting
(or something similar), you may need to use either a table with left/right justified cells,
or use the (non-breaking space - forces a space).
Also remember that most fonts are proportional, so you might need to play with fonts if you do not use a table.
Go to VisiBone's web site for a good web page showing colors.
|
|