home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / NWTP04 / XMESS / XPMAIL.PAS < prev   
Pascal/Delphi Source File  |  1993-12-28  |  558b  |  20 lines

  1. {$X+,B-,V-}
  2. Program xpmail;
  3.  
  4. { Example program for the pmail unit / NwTP 0.4 API. (c) 1994, R.Spronk }
  5.  
  6. uses nwMisc,nwBindry,pmail;
  7.  
  8. CONST MsgBodyTXTfile='a:testmsg.txt';
  9.  
  10. { Simple program illustrating the use of the SendMailFile call. }
  11. begin
  12. IF NOT PmailInstalled
  13.  then begin
  14.       writeln('PMail not installed on the current server.');
  15.       halt(1);
  16.       end;
  17. IF NOT SendMailFile('SUPERVISOR',OT_USER,
  18.                     'testmessage',MsgBodyTXTfile)
  19.    then writeln('Error sending file as mail. err# :',HexStr(pmail.result,4));
  20. end.