name: MIMEMessageModule
class: autohit.call.modules.MIMEMessageModule
This will form MIME messages. It will do single part or multipart. Start a session with start(), for single part, or multipart() for multipart messages. You can start a new session at any time. You must save() the message before you dump it to a string, tostring(), or Universe object, touni().
method |
"start" |
parameters: |
none |
returns: |
nothing |
description: |
Start a new message, with no multipart. |
method |
"multipart" |
parameters: |
none |
returns: |
nothing |
description: |
Start a new multipart message. |
method |
"setencoding" |
parameters: |
"enc" (REQUIRED): Textual name for the Charset. |
returns: |
nothing |
description: |
Set encoding to use for subsequent header operations. The encoding needs to be the textual name for a supported Charset. This varies by vm, though if you pull one from the MIME specifications, it should work. "us-ascii" will always work. If you do not call this, the default Charset for the system will be used (always a safe bet). |
method |
"resetencoding" |
parameters: |
none |
returns: |
nothing |
description: |
Use the default encoding for subsequent header operations. This will undo a "setencoding" method. |
method |
"from" |
parameters: |
"address" (REQUIRED): Valid internet address. |
"personal" (OPTIONAL): A string representing the 'personal' name. | |
returns: |
nothing |
description: |
Set the FROM address. There can only be one, so subsequent calls will overwrite the value. |
method |
"to" |
parameters: |
"address" (REQUIRED): Valid internet address. |
"personal" (OPTIONAL): A string representing the 'personal' name. | |
returns: |
nothing |
description: |
Add a TO address. You can add as many as you want (and memory can handle). |
method |
"cc" |
parameters: |
"address" (REQUIRED): Valid internet address. |
"personal" (OPTIONAL): A string representing the 'personal' name. | |
returns: |
nothing |
description: |
Add a CC address. You can add as many as you want (and memory can handle). |
method |
"bcc" |
parameters: |
"address" (REQUIRED): Valid internet address. |
"personal" (OPTIONAL): A string representing the 'personal' name. | |
returns: |
nothing |
description: |
Add a BCC address. You can add as many as you want (and memory can handle). |
method |
"subject" |
parameters: |
"string" (REQUIRED): A string containing the subject. |
returns: |
nothing |
description: |
Set the SUBJECT field. There can only be one, so subsequent calls will overwrite the value. |
method |
"header" |
parameters: |
"n" (REQUIRED): The header item name. |
"v" (REQUIRED): The header item value. | |
returns: |
nothing |
description: |
Add a header as a name/value pair. You can add as many as you want (and memory can handle). |
method |
"addcontent" |
parameters: |
"text" (REQUIRED): The text to add as the message content. |
returns: |
nothing |
description: |
Set the content text in a non-multipart message. If you call with a multipart() message, you will get an error. The message content will be text/plain. |
method |
"addpart" |
parameters: |
"text" (REQUIRED): The text content of the part. |
"contentid" (REQUIRED): The contentid for the part. | |
"description" (REQUIRED): The description for the part. | |
returns: |
nothing |
description: |
Add a part to a multipart message. If you call with a start() message, you will get an error. The message content will be text/plain. You can add as many as you want (and memory and MIME can handle). |
method |
"addpartenc" |
parameters: |
"text" (REQUIRED): The text content of the part. |
"tenc" (REQUIRED): Encoding to use for the content. | |
"contentid" (REQUIRED): The contentid for the part. | |
"cenc" (REQUIRED): Encoding to use for the content id field. | |
"description" (REQUIRED): The description for the part. | |
"denc" (REQUIRED): Encoding to use for the description field. | |
returns: |
nothing |
description: |
Add a part to a multipart message. If you call with a start() message, you will get an error. The message content will be text/plain. You can add as many as you want (and memory and MIME can handle). It will encode the fields as specified in the parameters. It supports the same encodings as the "setencoding" method. See that method for more information. |
method |
"addpartuni" |
parameters: |
"uniobj" (REQUIRED): The name of the universe object to add. |
"contentid" (REQUIRED): The contentid for the part. | |
"description" (REQUIRED): The description for the part. | |
"type" (REQUIRED): The content type, as a MIME type string. | |
returns: |
nothing |
description: |
Add a part to a multipart message. If you call with a start() message, you will get an error. You can add as many as you want (and memory and MIME can handle). The content will be pulled from a universe item. It can be virtually any kind of object, even raw binary will be handled properly. The type will not be verified against the actual object type, so you can cheat and use something else. The item is not actually read from the Universe until you use the tostring() or touni() methods, so be sure it remains a valid object until them (or you will get an error). |
method |
"addpartencuni" |
parameters: |
"uniobj" (REQUIRED): The name of the universe object to add. |
"tenc" (REQUIRED): Encoding to use for the content. This may or may not have an effec, based on the object. | |
"contentid" (REQUIRED): The contentid for the part. | |
"cenc" (REQUIRED): Encoding to use for the content id field. | |
"description" (REQUIRED): The description for the part. | |
"denc" (REQUIRED): Encoding to use for the description field. | |
"type" (REQUIRED): The content type, as a MIME type string. | |
returns: |
nothing |
description: |
Add a part to a multipart message. If you call with a start() message,
you will get an error. You can add as many as you want (and memory and MIME
can handle). It will encode the fields as specified in the parameters. It
supports the same encodings as the "setencoding" method. See that
method for more information. The content will be pulled from a universe item. It can be virtually any kind of object, even raw binary will be handled properly. The type will not be verified against the actual object type, so you can cheat and use something else. The item is not actually read from the Universe until you use the tostring() or touni() methods, so be sure it remains a valid object until them (or you will get an error). |
method |
"save" |
parameters: |
none |
returns: |
nothing |
description: |
Validate message and freeze send time. You can call this as often as you want. |
method |
"tostring" |
parameters: |
none |
returns: |
String containing the message. |
description: |
Return the message as a string. It must be a save()'d message. |
method |
"touni" |
parameters: |
"uniobj" (REQUIRED): The universe object. |
returns: |
nothing |
description: |
Save the message as a universe object. It will be save in the RFC822 stream format, which is usually 7bit ascii text. It must be a save()'d message. |
AUTOHIT 2003
MODULES DOCUMENTATION
Copyright Erich P Gatejen (c) 1989,1997,2003,2004
See license for details.