email Namespace Reference

create a HTML eMail from a template More...


Functions

string TD_form ()
string SP_form ()
string TD (type val)
string Row (type args)
string Intro ()
string Header ()
string Space ()
string SubjectRow ()
string ContactRow ()
string SpaceRow ()
string SubSectionRow (optional val=Details)
string TimeRow ()
string StartTimeRow ()
string Line ()
string Head ()
string Rows ()
string Var (type var)
string List2Html (type list)
 join the list together using the "<BR>" as delimiter
string Classify (type host)
 classify the host and set the TYPE and COLOR
string B (type args)
 join args together and return the bold HTML string
string Fg (type color, type args)
 join args together and return the color foreground HTML string
string Bg (type color, type args)
 join args together and return the color background HTML string
string MakeBodyToHTML (type template, type args)
 create a new mime object TOK of type text/html

Variables

type HEADER
 the HEADER of the html body message, this is the most visible information
type COLOR
 set the color of the high information parts in the email to something like red, blue, brown or black
type TYPE
 set the type of the email like PRODUCTION, DEVELOPMENT, TEST or UNKNOWN
type SUBJECT
 additional information added to HEADER with lower priority
type ROWS
 a list of key/value pairs to create the detail section of the HTML eMail
type FONT = Arial
 the default font to use
type CONTACT_MAIL = $SYSGROUP
 the email address of the user/group used in the mail-to link of the HTML eMail
type CONTACT_NAME = $SYSGROUPNAME
 the name of the user/group used in the mail-to link of the HTML eMail
array BACKGROUND_ALARM_COLORS = { 0 "#FFFFFF" 1 "#FFFFFF" 2 "#FFDBB8" 3 "#FFB8B8" 4 "#FFB8DB" 5 "#FF7A7A" }
 alarm colors used to signal states with different colors


Detailed Description

create a HTML eMail from a template

The HTML eMail package from file lib/libEmail.tcl is available with:

package require email ?1.0?
and is used to add a common style to your eMails to represent your corporate identity. The style is created using an template located in the template sub-directory of your BID server installation and is populated with variables and procedures.

example:

  1. create an HTML email from template info.htm
    package require email
    set email::HEADER       "HTML test email"
    set email::SUBJECT      "used to test the local setup"
    email::Classify         $HOST
    set email::ROWS         { token value ... }
    ::email::MakeBodyToHTML info.htm
    

The HTML feature is very powerful, to discover all possibilities use the plugin plugins/self/ping.tcl together with the template template/ping.htm as example.

Attention:
The doxygen documentation builder was primary developted for the C, C++, JAVA, ... language documentation and does not support the Tcl syntax.
The following translation rules have to be applied:
variable string NAME = DEFAULT set NAME DEFAULT
variable array NAME = DEFAULT array set NAME DEFAULT
procedure string NAME ( type ARG1, ... ) proc NAME {ARG1 ...}
procedure string NAME ( optional ARG1=DEF1, ... ) proc NAME {{ARG1 DEF1} ...}


Function Documentation

string email::TD_form (  ) 

string email::SP_form (  ) 

string email::TD ( type  val  ) 

string email::Row ( type  args  ) 

string email::Intro (  ) 

string email::Header (  ) 

string email::Space (  ) 

string email::SubjectRow (  ) 

string email::ContactRow (  ) 

string email::SpaceRow (  ) 

string email::SubSectionRow ( optional  val = Details  ) 

string email::TimeRow (  ) 

string email::StartTimeRow (  ) 

string email::Line (  ) 

string email::Head (  ) 

string email::Rows (  ) 

string email::Var ( type  var  ) 

string email::List2Html ( type  list  ) 

join the list together using the "<BR>" as delimiter

string email::Classify ( type  host  ) 

classify the host and set the TYPE and COLOR

Parameters:
host the host-name to classify

string email::B ( type  args  ) 

join args together and return the bold HTML string

Parameters:
args the list of arguments be bold
Returns:
the bold HTML string

string email::Fg ( type  color,
type  args 
)

join args together and return the color foreground HTML string

Parameters:
color the foreground color
args the list of arguments be colorized
Returns:
the colorized HTML string

string email::Bg ( type  color,
type  args 
)

join args together and return the color background HTML string

Parameters:
color the background color
args the list of arguments be colorized
Returns:
the colorized HTML string

string email::MakeBodyToHTML ( type  template,
type  args 
)

create a new mime object TOK of type text/html

Parameters:
template the template to use relative to the template sub-directory of the BID server installation
args additional arguments, currently only supported -keep
Create a new mime header object TOK of type text/html using the template and the variables defined. The template have to be a relative file-name in the template sub-directory of the BID server installation.
if the argument -keep is available the new mime object is created using the Initialize command and the old mime object is put on the stack and is available after the Finalize command is executed. If the argument -keep is not available the old mime object is deleted. The header of the new mime is cleared and the From mime header token is set from the previous mime object TOK.


Variable Documentation

type email::HEADER

the HEADER of the html body message, this is the most visible information

type email::COLOR

set the color of the high information parts in the email to something like red, blue, brown or black

type email::TYPE

set the type of the email like PRODUCTION, DEVELOPMENT, TEST or UNKNOWN

type email::SUBJECT

additional information added to HEADER with lower priority

type email::ROWS

a list of key/value pairs to create the detail section of the HTML eMail

type email::FONT = Arial

the default font to use

type email::CONTACT_MAIL = $SYSGROUP

the email address of the user/group used in the mail-to link of the HTML eMail

type email::CONTACT_NAME = $SYSGROUPNAME

the name of the user/group used in the mail-to link of the HTML eMail

array email::BACKGROUND_ALARM_COLORS = { 0 "#FFFFFF" 1 "#FFFFFF" 2 "#FFDBB8" 3 "#FFB8B8" 4 "#FFB8DB" 5 "#FF7A7A" }

alarm colors used to signal states with different colors

The colors differ from level 0=green up to level 5=red


Generated on Thu Sep 13 21:19:10 2007 for bid by  doxygen 1.5.0