swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   MailOutBoxSendMail    

Library: ommail - email support (SMTP and POP3)
Include: ommail.xin

Declaration

  define external output function MailOutBoxSendMail
             value MailOutBox this-MailOutBox
     to      value stream recipient
     subject value stream subject optional initial {""}
     header  value stream header-info optional


Purpose

This function sends a mail message with the specified subject, mail header, and recipient. It returns an external output object which is used to send the body of the message. As you write to the stream, the message parts are sent out (there is no buffering of the message). Closing the stream attached to this external output object signals the end of message composition and triggers the completion of the delivery of the message. It is an error to reopen a stream attached to an external output object derived from a mail outbox object, once that stream has been closed.

Arguments:

Example:

    include "ommail.xin"
    process
         local stream msg
         local stream t-Error variable initial-size 0
         local MailOutBox this-MailOutBox
         set this-MailOutBox to MailOutBoxCreate name "joe" address "joe@joe.com"
         open msg as MailOutBoxSendMail this-MailOutBox
            to "sue@sue.org"
            subject "Greetings"
         MailOutBoxGetStatusReport this-MailOutBox into t-Error
         repeat over t-Error
            put #error t-Error
         again
         halt when number of t-Error > 0
         put msg "Just wanted " || "to say " || "hello." || "%n"
         close msg
         ; Note: the close action sent the msg

        Other Library Functions
   MailInBoxClose
   MailInBoxCreate
   MailInBoxGetMessage
   MailInBoxGetMessageSize
   MailInBoxGetNumberOfMessages
   MailInBoxGetStatusReport
   MailInBoxIsInError
   MailInBoxIsOpen
   MailInBoxMarkAllMessagesForDeletion
   MailInBoxMarkMessageForDeletion
   MailInBoxOpen
   MailInBoxResetDeletionFlags
   MailIsVersionCompatible
   MailLibraryVersion
   MailOutBoxCreate
   MailOutBoxGetStatusReport
   MailOutBoxIsInError
   MailOutBoxSendMail
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:07:32 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.