-** SENDOFF -- send off call to mailer & collect response.
-**
-** Parameters:
-** e -- the envelope to mail.
-** m -- mailer descriptor.
-** pvp -- parameter vector to send to it.
-** ctladdr -- an address pointer controlling the
-** user/groupid etc. of the mailer.
-**
-** Returns:
-** exit status of mailer.
-**
-** Side Effects:
-** none.
-*/
-static
-sendoff(e, m, pvp, ctladdr)
- register ENVELOPE *e;
- MAILER *m;
- char **pvp;
- ADDRESS *ctladdr;
-{
- register int i;
- register MCONINFO *mci;
- extern MCONINFO *openmailer();
-
- /*
- ** Create connection to mailer.
- */
-
- mci = openmailer(m, pvp, ctladdr, FALSE);
- if (mci == NULL)
- return (-1);
-
- /*
- ** Format and send message.
- */
-
- putfromline(mci->mci_out, m);
- (*e->e_puthdr)(mci->mci_out, m, e);
- putline("\n", mci->mci_out, m);
- (*e->e_putbody)(mci->mci_out, m, e);
-
- i = endmailer(mci, pvp[0]);
-
- /* arrange a return receipt if requested */
- if (e->e_receiptto != NULL && bitnset(M_LOCAL, m->m_flags))
- {
- e->e_flags |= EF_SENDRECEIPT;
- /* do we want to send back more info? */
- }
-
- return (i);
-}
-\f/*