mime context management procedures
[MAIN processing library]


Functions

string _RawInitialize (type args)
 private command to create a new mime object TOK
string Initialize (type args)
 initialize a new mime object and put the old object on the stack
string Finalize ()
 destroy the mime object available in the global variable TOK
string CallPlugin (type subject)
 call an other service on the same BID server
string SendEmail (type args)
 send out the eMail using the current mime object defined in TOK
string MakeBodyToTXT (type text)
 create a new text/plain mime object using text

Function Documentation

string _RawInitialize ( type  args  ) 

private command to create a new mime object TOK

Parameters:
args list of mime::initialize arguments
The old HEADER global variable will be reset and filled with the From header token of the old TOK global variable

string Initialize ( type  args  ) 

initialize a new mime object and put the old object on the stack

Parameters:
args the list of arguments parsed for:
--copy create the new mime object as a copy of the already available mime object TOK
--text create a text/plain mime object ready for population with mime_args
mime::initialize list of arguments to define the new mime object
Initialize the new mime object and set the global variable TOK. The header of the new mime object is empty except for the From token taken from the previous mime message. The global variables, belonging to the old mime object TOK, are put on the stack and recovered after the Finalize command was called.
example:
Initialize --text -string [CreateBody token1 text1 token2.list {text2.1 text2.2 text2.3}]

string Finalize (  ) 

destroy the mime object available in the global variable TOK

Recover the previous mime object TOK from the stack with Initialize and reset the global variables

string CallPlugin ( type  subject  ) 

call an other service on the same BID server

Parameters:
subject the subject of the eMail with the plugin name before the first @
this procedure is used to call an other service from inside BID server without routing the service call through your local MTA . The service have to be local available.
example:
Initialize --text -string [CreateBody tok1 val1 tok2 val2 ...]
CallPlugin service_to_call@mail
Finalize

string SendEmail ( type  args  ) 

send out the eMail using the current mime object defined in TOK

Parameters:
args a list of option/value pairs from:
-spam-interval value set the SPAM_INTERVALL temporary to value
-send-type value set the sendType temporary to value
Returns:
the return message from your MTA
send out the eMail from the mime object defined in the global variable TOK using SPAM_INTERVALL or -spam-interval to detect SPAM and sendType or -send-type to define the smtp server to use. If the To mime header token has the prefix appmail: the eMail will be forwarded to the APPMAILRELAY server and finally send to the Internet using the gateway APPMAILHOST
example:
Initialize --copy
SetHeader   To my-Address Subject my-Subject
SendEmail
Finalize

string MakeBodyToTXT ( type  text  ) 

create a new text/plain mime object using text

Parameters:
text the new string of the body
Delete the current mime object from global variable TOK and create a new mime object of type text/plain with text . The From mime header token will be set to the mime header token of the old TOK .
example:
MakeBodyToTXT [CreateBody ...]


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