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 would with most other mail applications.

Forwarding mail

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

Select the mail piece you want 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 you would do something like:

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

The full script looks similar to the following:

<!--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 you want to reply to. 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 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 you enter something like:

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 would look similar to:

<!--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 © 1999 Sybase, Inc. All rights reserved.