Chapter 9 PowerDynamo Mail Support


Forwarding and replying to mail

You can forward, reply to, or redirect incoming mail in the same way as you do with most other mail applications.

Forwarding mail

You can either include your own message along with the forwarded mail piece or you can forward a mail piece as it is with no additional text.

Select the mail piece to forward. For example:

mlist = new MailList ("mail.sybase.com", "elmo", "dynamo", "elmo@mail.sybase.com");
mlistitem = mlist[0];
mlistitem.Retrieve();

Specify that you want to forward the mail, and the address to where you want to forward it. For example:

forwardmp= mlistitem.Forward("sam@sybase.com")

The body of the original mail piece is now held in forwardmp.body . To add your own text to the mail piece, do something similar to this:

forwardmp.body = ( "Please review this mail piece " + forwardmp.body ); 

The full script looks like this:

<!--SCRIPT
    mlist = new MailList ("mail.sybase.com", "elmo", "dynamo", "elmo@mail.sybase.com");
    mlistitem = mlist[0];
    mlistitem.Retrieve();
    forwardmp= mlistitem.Forward("sam@sybase.com") 
    document.writeln( forwardmp.GetErrorCode() );
    document.writeln( forwardmp.GetErrorInfo() );
    document.writeln(forwardmp.body);
    forwardmp.body = ( "Please review this mail piece " + forwardmp.body );
    forwardmp.Send();
-->

Replying to mail

Select the mail piece to which you want to reply. For example:

mlist = new MailList ("mail.sybase.com", "elmo", "dynamo", "elmo@mail.sybase.com");
mlistitem = mlist[0];
mlistitem.Retrieve();

Indicate that you want to use the Reply method, and the address to which to respond. For example, to respond to all recipients including the sender, and to include the original mail piece in the body of the outgoing mail piece, enter:

replymp=mlistitem.Reply( "all", true );

To add your own text to the mail piece, enter something like this:

forwardmp.body = ( "I have read the attached document and all the changes look correct. " + replymp.body ); 

The mail piece is then sent in the normal fashion. The full script looks similar to this:

<!--SCRIPT 
    mlist = new MailList ("mail.sybase.com", "elmo", "dynamo", "elmo@mail.sybase.com");
    mlistitem = mlist[8];
    mlistitem.Retrieve();
    replymp=mlistitem.Reply( "all", true );
    forwardmp.body = ( "I have read the attached document and all the changes look correct. " + replymp.body );
    replymp.Send();
-->

 


Copyright © 2001 Sybase, Inc. All rights reserved.