Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/taylor/DoMail

StarterPak/!Newsbase/Transports/taylor/DoMail

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet
Filename: StarterPak/!Newsbase/Transports/taylor/DoMail
Read OK:
File size: 03C5 bytes
Load address: 0000
Exec address: 0000
File contents
| > DoMail
|
| Syntax: DoMail <Filename> <Addresses>
|
| DoMail passes the specified file through Rmail. It performs no error
| checking on the file, and assumes that the file contains a valid header.
|
| Author:   	    Gunnar Z�tl
| Date:	    	    17-Sep-1994
| Last Modified:    19-Sep-1994
|
| Ensure enough memory for rmail to run, you may need more when using smail
|
Wimpslot -min 640k
|
| this gets around a problem with the C library, which sometimes seems
| confused then receiving a <system$variable> together with I/O redirection.
|
Set Alias$DoMailIt rmail %*1 < %0
|
| we assume that sending the mail will succeed.
|
Set NewsBase$ReturnInfo Mail sent
DoMailIt
Set NewsBase$ReturnCode <Sys$ReturnCode>
|
| If sending did not succeed, we alter the Info for NewsBase here.
|
If "<NewsBase$ReturnCode>" <> "0" Then Set NewsBase$ReturnInfo Mail failed
|
| now remove the file sendmail passed us, and unset the helper macro.
|
remove %0
unset alias$DoMailIt
00000000  7c 20 3e 20 44 6f 4d 61  69 6c 0a 7c 0a 7c 20 53  || > DoMail.|.| S|
00000010  79 6e 74 61 78 3a 20 44  6f 4d 61 69 6c 20 3c 46  |yntax: DoMail <F|
00000020  69 6c 65 6e 61 6d 65 3e  20 3c 41 64 64 72 65 73  |ilename> <Addres|
00000030  73 65 73 3e 0a 7c 0a 7c  20 44 6f 4d 61 69 6c 20  |ses>.|.| DoMail |
00000040  70 61 73 73 65 73 20 74  68 65 20 73 70 65 63 69  |passes the speci|
00000050  66 69 65 64 20 66 69 6c  65 20 74 68 72 6f 75 67  |fied file throug|
00000060  68 20 52 6d 61 69 6c 2e  20 49 74 20 70 65 72 66  |h Rmail. It perf|
00000070  6f 72 6d 73 20 6e 6f 20  65 72 72 6f 72 0a 7c 20  |orms no error.| |
00000080  63 68 65 63 6b 69 6e 67  20 6f 6e 20 74 68 65 20  |checking on the |
00000090  66 69 6c 65 2c 20 61 6e  64 20 61 73 73 75 6d 65  |file, and assume|
000000a0  73 20 74 68 61 74 20 74  68 65 20 66 69 6c 65 20  |s that the file |
000000b0  63 6f 6e 74 61 69 6e 73  20 61 20 76 61 6c 69 64  |contains a valid|
000000c0  20 68 65 61 64 65 72 2e  0a 7c 0a 7c 20 41 75 74  | header..|.| Aut|
000000d0  68 6f 72 3a 20 20 20 09  20 20 20 20 47 75 6e 6e  |hor:   .    Gunn|
000000e0  61 72 20 5a f6 74 6c 0a  7c 20 44 61 74 65 3a 09  |ar Z.tl.| Date:.|
000000f0  20 20 20 20 09 20 20 20  20 31 37 2d 53 65 70 2d  |    .    17-Sep-|
00000100  31 39 39 34 0a 7c 20 4c  61 73 74 20 4d 6f 64 69  |1994.| Last Modi|
00000110  66 69 65 64 3a 20 20 20  20 31 39 2d 53 65 70 2d  |fied:    19-Sep-|
00000120  31 39 39 34 0a 7c 0a 7c  20 45 6e 73 75 72 65 20  |1994.|.| Ensure |
00000130  65 6e 6f 75 67 68 20 6d  65 6d 6f 72 79 20 66 6f  |enough memory fo|
00000140  72 20 72 6d 61 69 6c 20  74 6f 20 72 75 6e 2c 20  |r rmail to run, |
00000150  79 6f 75 20 6d 61 79 20  6e 65 65 64 20 6d 6f 72  |you may need mor|
00000160  65 20 77 68 65 6e 20 75  73 69 6e 67 20 73 6d 61  |e when using sma|
00000170  69 6c 0a 7c 0a 57 69 6d  70 73 6c 6f 74 20 2d 6d  |il.|.Wimpslot -m|
00000180  69 6e 20 36 34 30 6b 0a  7c 0a 7c 20 74 68 69 73  |in 640k.|.| this|
00000190  20 67 65 74 73 20 61 72  6f 75 6e 64 20 61 20 70  | gets around a p|
000001a0  72 6f 62 6c 65 6d 20 77  69 74 68 20 74 68 65 20  |roblem with the |
000001b0  43 20 6c 69 62 72 61 72  79 2c 20 77 68 69 63 68  |C library, which|
000001c0  20 73 6f 6d 65 74 69 6d  65 73 20 73 65 65 6d 73  | sometimes seems|
000001d0  0a 7c 20 63 6f 6e 66 75  73 65 64 20 74 68 65 6e  |.| confused then|
000001e0  20 72 65 63 65 69 76 69  6e 67 20 61 20 3c 73 79  | receiving a <sy|
000001f0  73 74 65 6d 24 76 61 72  69 61 62 6c 65 3e 20 74  |stem$variable> t|
00000200  6f 67 65 74 68 65 72 20  77 69 74 68 20 49 2f 4f  |ogether with I/O|
00000210  20 72 65 64 69 72 65 63  74 69 6f 6e 2e 0a 7c 0a  | redirection..|.|
00000220  53 65 74 20 41 6c 69 61  73 24 44 6f 4d 61 69 6c  |Set Alias$DoMail|
00000230  49 74 20 72 6d 61 69 6c  20 25 2a 31 20 3c 20 25  |It rmail %*1 < %|
00000240  30 0a 7c 0a 7c 20 77 65  20 61 73 73 75 6d 65 20  |0.|.| we assume |
00000250  74 68 61 74 20 73 65 6e  64 69 6e 67 20 74 68 65  |that sending the|
00000260  20 6d 61 69 6c 20 77 69  6c 6c 20 73 75 63 63 65  | mail will succe|
00000270  65 64 2e 0a 7c 0a 53 65  74 20 4e 65 77 73 42 61  |ed..|.Set NewsBa|
00000280  73 65 24 52 65 74 75 72  6e 49 6e 66 6f 20 4d 61  |se$ReturnInfo Ma|
00000290  69 6c 20 73 65 6e 74 0a  44 6f 4d 61 69 6c 49 74  |il sent.DoMailIt|
000002a0  0a 53 65 74 20 4e 65 77  73 42 61 73 65 24 52 65  |.Set NewsBase$Re|
000002b0  74 75 72 6e 43 6f 64 65  20 3c 53 79 73 24 52 65  |turnCode <Sys$Re|
000002c0  74 75 72 6e 43 6f 64 65  3e 0a 7c 0a 7c 20 49 66  |turnCode>.|.| If|
000002d0  20 73 65 6e 64 69 6e 67  20 64 69 64 20 6e 6f 74  | sending did not|
000002e0  20 73 75 63 63 65 65 64  2c 20 77 65 20 61 6c 74  | succeed, we alt|
000002f0  65 72 20 74 68 65 20 49  6e 66 6f 20 66 6f 72 20  |er the Info for |
00000300  4e 65 77 73 42 61 73 65  20 68 65 72 65 2e 0a 7c  |NewsBase here..||
00000310  0a 49 66 20 22 3c 4e 65  77 73 42 61 73 65 24 52  |.If "<NewsBase$R|
00000320  65 74 75 72 6e 43 6f 64  65 3e 22 20 3c 3e 20 22  |eturnCode>" <> "|
00000330  30 22 20 54 68 65 6e 20  53 65 74 20 4e 65 77 73  |0" Then Set News|
00000340  42 61 73 65 24 52 65 74  75 72 6e 49 6e 66 6f 20  |Base$ReturnInfo |
00000350  4d 61 69 6c 20 66 61 69  6c 65 64 0a 7c 0a 7c 20  |Mail failed.|.| |
00000360  6e 6f 77 20 72 65 6d 6f  76 65 20 74 68 65 20 66  |now remove the f|
00000370  69 6c 65 20 73 65 6e 64  6d 61 69 6c 20 70 61 73  |ile sendmail pas|
00000380  73 65 64 20 75 73 2c 20  61 6e 64 20 75 6e 73 65  |sed us, and unse|
00000390  74 20 74 68 65 20 68 65  6c 70 65 72 20 6d 61 63  |t the helper mac|
000003a0  72 6f 2e 0a 7c 0a 72 65  6d 6f 76 65 20 25 30 0a  |ro..|.remove %0.|
000003b0  75 6e 73 65 74 20 61 6c  69 61 73 24 44 6f 4d 61  |unset alias$DoMa|
000003c0  69 6c 49 74 0a                                    |ilIt.|
000003c5