HP3000-L Archives

February 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Ted Ashton <[log in to unmask]>
Date:
Thu, 22 Feb 2001 22:52:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Thus it was written in the epistle of Michael Anderson,
> Can anyone send me details on
> 'How to Send email messages from M.P.E.'?
>
>  I am running M.P.E. 6.0 pp2, so this should be very simple.
>
> Source code would be great but, the only compilers I have is COBOLII. I think
> GNU 'C' compiler is on this machine, but not sure how to use it. I've used
> C/iX in the past, but don't have it on this machine.
>
> I want to give unattended batch jobs the ability to send email when they are
> in trouble, should be very simple.

If you stick Perl on the machine as well, you can use it to do the job.  Here's
a quote from the Mail::Sendmail module (which, by the by, does not require
Sendmail to be installed):

use Mail::Sendmail;

%mail = ( To      => [log in to unmask],
          From    => [log in to unmask],
          Message => "This is a very short message"
        );

sendmail(%mail) or die $Mail::Sendmail::error;

print "OK. Log says:\n", $Mail::Sendmail::log;

HTH,
Ted

Disclaimer: I've not tried the module, as simply sending mail from Perl calling
sendmail is pretty straightforward.
--
Ted Ashton ([log in to unmask]), Info Sys, Southern Adventist University
          ==========================================================
There can be no question, however, that prolonged commitment to mathematical
exercises in economics can be damaging. It leads to the atrophy of judgement
and intuition...
                                           -- Galbraith, John Kenneth
          ==========================================================
         Deep thoughts to be found at http://www.southern.edu/~ashted

ATOM RSS1 RSS2