package VMS::Mail; use strict; use Carp; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw(); @EXPORT_OK = qw(&new &smg_read); $VERSION = '0.06'; bootstrap VMS::Mail $VERSION; # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. 1; __END__ # Below is the documentation section. =head1 NAME VMS::Mail - VMS callable mail interface =head1 SYNOPSIS use VMS::Mail; Routine to initiate a new untyped object instance: $object = new VMS::Mail(); Routines to interact with mailfile contexts: $mailfile = new VMS::Mail(); $href = $mailfile->mailfile_begin(); $href = $mailfile->open(); $href = $mailfile->close(); $href = $mailfile->info_file(); $href = $mailfile->compress(); $href = $mailfile->purge_waste(); $href = $mailfile->end(); Routines to interact with message contexts: $message = new VMS::Mail(); $href = $message->message_begin(); $href = $message->modify(); $href = $message->info(); $href = $message->get(); $href = $message->select(); $href = $message->delete(); $href = $message->copy(); $href = $message->end(); Routines to interact with send contexts: $send = new VMS::Mail(); $href = $send->send_begin(); $href = $send->abort(); $href = $send->add_address(); $href = $send->add_attribute(); $href = $send->add_bodypart(); $href = $send->message(); $href = $send->end(); Routines to interact with user contexts: $user = new VMS::Mail(); $href = $user->user_begin(); $href = $user->delete_info(); $href = $user->set_info(); $href = $user->get_info(); $href = $user->end(); One oddball routine that is here temporarily: $returned_string = VMS::Mail::smg_read($prompt [,$keydef_filename [,$default_keydef_filename]]) =head1 DESCRIPTION This module supplies a complete interface to callable the VMSMail routines for client-side access. This is the first CPAN release. This module is brand new and certainly has bugs. I will be testing it further and will release updates as I repair problems. The purpose of this release is to provide external access to it for peer review. I am very new to the module development process and would welcome any constructive criticism. =head2 Functions =item new This function returns a new VMS::Mail object. The object is 'untyped'. Your next call should be to one of the context-type_begin methods to establish a type and a vms-level context within the object. =head2 Object methods =item mailfile_begin C establishes an untyped object as a VMS MAILFILE context object. Methods for mailfile objects can now be used from the object. Output Items MAIL_DIRECTORY String, 255 =item message_begin C establishes an untyped object as a VMS MESSAGE context object. Methods for message objects can now be used from the object. Input items FILE_CTX Context - object returned from new, then MAILFILE_BEGIN Output Items SELECTED Integer =item send_begin C establishes an untyped object as a VMS SEND context object. Methods for send objects can now be used from the object. Input items PERS_NAME String, 127 NO_PERS_NAME Presence flag SIGFILE String, 255 NO_SIGFILE Presence flag DEFAULT_TRANSPORT String, 255 NO_DEFAULT_TRANSPORT Presence flag Output Items COPY_FORWARD Integer COPY_SEND Integer COPY_REPLY Integer SEND_USER String, 255 =item user_begin C establishes an untyped object as a VMS USER context object. Methods for user objects can now be used from the object. Output Items AUTO_PURGE Integer CAPTIVE Integer CC_PROMPT Integer COPY_FORWARD Integer COPY_REPLY Integer COPY_SEND Integer FORWARDING String, 255 FORM String, 255 FULL_DIRECTORY String, 255 NEW_MESSAGES Integer PERSONAL_NAME String, 127 QUEUE String, 255 RETURN_USERNAME String, 255 RETURN_SIGFILE String, 255 RETURN_SUB_DIRECTORY String, 255 TRANSPORT String, 255 USER1 String, 255 USER2 String, 255 USER3 String, 255 USER3 String, 255 =item end C completes a context-type_begin call and re-establishes the calling object as an untyped object. =item open C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Output Items WASTEBASKET String, 255 =item close C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Input items FULL_CLOSE Presence flag Output Items DATA_RECLAIM Integer DATA_SCAN Integer INDEX_RECLAIM Integer TOTAL_RECLAIM Integer MESSAGES_DELETED Integer =item info_file C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Input items DEFAULT_NAME String, 255 NAME String, 255 FOLDER_ROUTINE Callback - reference to a subroutine Output Items DELETED_BYTES Integer WASTEBASKET String, 255 RESULTSPEC String, 255 =item compress C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Input items FULL_CLOSE Presence flag DEFAULT_NAME String, 255 NAME String, 255 Output Items RESULTSPEC String, 255 =item purge_waste C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Input items RECLAIM Presence flag Output Items DATA_RECLAIM Integer DATA_SCAN Integer INDEX_RECLAIM Integer DELETED_BYTES Integer TOTAL_RECLAIM Integer MESSAGES_DELETED Integer =item modify C. Refer to the VMS Callable mail documentation. Applies to MAILFILE objects. Input items DEFAULT_NAME String, 255 NAME String, 255 WASTEBASKET_NAME String, 39 Output Items RESULTSPEC String, 255 Applies to MESSAGE objects. Input items BACK Integer FLAGS Bitvector - array reference ID Integer NEXT Integer UFLAGS Integer Output Items CURRENT_ID Integer =item info C. Refer to the VMS Callable mail documentation. Applies to MESSAGE objects. Input items BACK Integer ID Integer NEXT Integer Output Items BINARY_DATE String, VMS Date & Time CC String, 255 CURRENT_ID Integer DATE String, 255 EXTID String, 255 FROM String, 255 REPLY_PATH String, 255 RETURN_FLAGS Bitvector - array reference SENDER String, 255 SIZE Integer SUBJECT String, 255 TO String, 255 PARSE_QUOTES Integer RETURN_UFLAGS Integer =item get C. Refer to the VMS Callable mail documentation. Applies to MESSAGE objects. Input items AUTO_NEWMAIL Presence flag BACK Integer UFLAGS Integer CONTINUE Presence flag ID Integer NEXT Integer Output Items BINARY_DATE String, VMS Date & Time CC String, 255 CURRENT_ID Integer DATE String, 255 EXTID String, 255 FROM String, 255 RECORD String, 255 RECORD_TYPE String, enumerated value REPLY_PATH String, 255 RETURN_FLAGS Bitvector - array reference RETURN_UFLAGS Integer SENDER String, 255 SIZE Integer SUBJECT String, 255 TO String, 255 PARSE_QUOTES Integer =item select C