Chapter 3 DynaScript Predefined Objects
The mailList
object
has these methods:
mailList.Disconnect( [deleteMarkedPieces] )
Disconnects from the mail server. The optional parameter deleteMarkedPieces indicates whether or not mail pieces marked for deletion should be deleted from the mail server at the time of disconnect. The default is true.
Boolean indicating if the disconnect was successful.
This example connects and then disconnects from the mail server:
<!--SCRIPT
mlist = new MailList ("mail.sybase.com", "elmo", "secret", "elmo@mail.sybase.com ");
if( !mlist.Disconnect() ) {
document.writeln( mlist.GetErrorCode() );
document.writeln( mlist.GetErrorInfo() );
}
-->
"mailPiece object (incoming)".
"mailPiece object (outgoing)".
mailList.GetErrorCode( )
Returns a code representing the most recent generated error. The error will either be a three-digit POP3 reply code or a three-digit code in the 900 range generated by Dynamo.
Integer.
This example returns an error if any problems are encountered while disconnecting from the mail server:
<!--SCRIPT
mlist = new MailList ("mail.sybase.com", "elmo", "secret", "elmo@mail.sybase.com ");
if( !mlist.Disconnect() ) {
document.writeln( mlist.GetErrorCode() );
document.writeln( mlist.GetErrorInfo() );
}
document.WriteLn(mlist);
-->
mailList.GetErrorInfo( )
Returns a string containing an error message. The error can either be a complete reply from the POP3 server or from PowerDynamo.
String.
This example returns an error if any problems are encountered while disconnecting from the mail server
<!--SCRIPT
mlist = new MailList ("mail.sybase.com", "elmo", "secret", "elmo@mail.sybase.com " );
if( !mlist.Disconnect() ) {
document.writeln( mlist.GetErrorCode() );
document.writeln( mlist.GetErrorInfo() );
}
-->
"mailPiece object (incoming)".
"mailPiece object (outgoing)".
Copyright © 1999 Sybase, Inc. All rights reserved. |
![]() |