swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

MailOutBoxSendMail

 
 

Library: Net, Email support, SMTP and POP3 (OMMAIL)
Include: ommail.xin
Return type: output
Returns: 

An external output object.


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 or recipients. 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 "[email protected]"
         open msg as MailOutBoxSendMail this-MailOutBox
            to "[email protected]"
            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
   MailInBox
   MailInBoxClose
   MailInBoxCreate
   MailInBoxGetMessage
   MailInBoxGetMessageSize
   MailInBoxGetNumberOfMessages
   MailInBoxGetStatusReport
   MailInBoxIsInError
   MailInBoxIsOpen
   MailInBoxMarkAllMessagesForDeletion
   MailInBoxMarkMessageForDeletion
   MailInBoxOpen
   MailInBoxResetDeletionFlags
   MailIsVersionCompatible
   MailLibraryVersion
   MailOutBox
   MailOutBoxCreate
   MailOutBoxGetStatusReport
   MailOutBoxIsInError
   MailOutBoxSendMail
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:29 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.