Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ml_send(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

checkaddr(ADM)

llog(S)

mmdf(S)

phs(S)

submit(ADM)

tai(S)


 ml_send(S)                     6 January 1993                     ml_send(S)


 Name

    ml_send - Simple mail submission (ml_)

 Syntax


    cc  . . .  -lmmdf


    #include  <util.h>
    #include  <stdio.h>

    ml_1adr (return, sender, from, subject, address)
        int return, sender;
        char *from, *subject, *address;

    ml_adr (address)
        char *address;

    ml_aend ()

    ml_cc ()

    ml_end (end-stat)
        int  end-stat;

    ml_file (fil-text)
        FILE *file-text;

    ml_init (return, sender, from, subject)
        int return, sender;
        char *from, *subject;

    ml_tinit ()

    ml_to ()

    ml_txt (text)
        char *text;


 Description

    These procedures may be used for simple mail submission, providing a sim-
    ple interface to the mm package described in mmdf(S).  The basic
    sequence for using these calls is:

       # include <util.h>

       ml_init (YES, NO, "My Name", "The Subject");
       ml_adr ("destination address 1");
       ml_adr ("destination address 2");
       ...
       ml_aend ();
       ml_tinit ();
       ml_txt ("Some opening text");
       ml_txt ("maybe some more text");
       ml_file (stdio-file-stream-descriptor-of-file-to-include);
       if (ml_end (OK)) != OK)
       {   error-handling code }

    Arguments that are to be defaulted should be zero.  All routines return a
    status value of OK or NOTOK.

    mlinit's arguments specify:

    a)   Whether return-mail (to the sender) should be allowed (1=yes, 0=no).

    b)   Whether a Sender field should be used to specify the correct sender
         (contingent on next argument).

    c)   Text for the From field.

    d)   Text for the Subject field.


    If (b) is NO, then (c)'s text must contain the correct sender informa-
    tion, or else just contain the "name" portion of the address.

    The mlto and mlcc calls are used to switch between "To:" and "cc:"
    addresses.  Normally, only "To:" addresses are used and, for this, no
    mlto call is needed.

    The mladr call specifies the text of one address.  An "address" is what-
    ever is valid for your system as if you were typing it to the
    checkaddr(ADM) command. mlaend signals the end of address specification,
    and mltinit signals the start of message text submission.

    The mltxt call directly enters raw text. The mlfile call passes a stdio
    file pointer, to be used for file text submission; all of the (remaining)
    contents of the file are submitted.  Any number of mltxt and mlfile
    calls may be made and they may be freely mixed. They just append text to
    the message.  The text must contain its own newlines.

    The ml1adr call is provided as a convenient way to initiate mail when
    there is only one addressee.  Its arguments are the same as for mlinit,
    except there is an extra argument for the address string.  It may be
    used, with the earlier example, to replace the mlinit, mladdr, mlaend,
    and mltinit calls.

 See also

    checkaddr(ADM), llog(S), mmdf(S), phs(S), submit(ADM), tai(S)

 Standards conformance

    The mlsend procedures are not part of any currently supported standard;
    they were developed at the University of Delaware and are used by permis-
    sion.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026