ͫFM6/ 6# JuD@LLLfootnote continues next pagecontinued footnoteHP LaserJet IIIP H:xbd 290SNsend email from OA wpf, use short passive config m.c, separate copies to cc's D Bindoff bd8(:5 -_LRrJj+TNX^ZzC.:;^|\/()<>[]{}IA1ai023456789  4 ,   // ::%V*L -T -T -T -T -T -T -T -T'-+v-R'wp ` p  %@8pQ*PWARNING:THE FOLLOWING CODE MUST NOT BE USED UNLESS YOU ARE EXPERT IN ENABLE OA NPROGRAMMING AND MACROS - ALL RESPONSIBILITY FOR USE MUST BE ACCEPTED BY USER. PSince filenames and directories are referred to in the code I have used Enables)wordprocessing to substitute as follows;A'C:'substituted by 'we' no other instances of we in the text9's.bat'" 's#bat'batch file for first recipient send9'cc.bat'" 'cc#bat' batch file for 2nd recipient sendL'o.a''o#a'the text message finally sent, referred to in the config fileQ'$@$' " '$#$'remove instances of links which slows the email sending programb'm.c' " 'm#c'config file for 'passive' elements only 1. the message file 2.the senders serverLThis code is interim only and uses the earlier version of config sendemail Mwhich will not accept Enables ASCII output. The later version will be postedNon Thogscave, in which case the config file can contain all the command line Kparameters and a separate cc send would not be required. The batch filesKrefer to sm which is renamed sendemail.exe to shorten characters required,>this renaming should be removed with the full config version. THE NOTION JUse any Enable wordprocess file, fire a macro with {&f9}e, opens a small Ktext window intended for first edit, user strips out the comments as theseNwill show in full in the text file and are probably not intended to be sent -Jclose the edit window with {&end}, enter the addresses, sender should be Fprogrammed, recipient is mandatory, subject should work empty or not.MWhen address fields are done re-edit if desired with {^m}, or send the emailMwith {!f6}. The menu Y is the final destination, you will need to substitutePyour own menu. There are several references to the Y menu for abort conditions Mthese will need to be substituted also for satisfactory operation. Once the Nre-edit is complete it becomes mandatory to send ({!f6}) at the subject line B(or before), you will need to re-program if you want an out here.NTHE MACRO {&F9}E OR ${E}.WPM - contains a reference to this program- you will*need to adjust to your own file reference{^Home}{Up}{F3} h{F2}{Left}{Wname}neword~{If Error}{EndIf}{OpenW} udpk{2X}~{Wname}email~Q\fs\enmailt2.fw{End};;you will need to extract the program file from this file/{&F5};;I call the program file enmailt2.fw{GoToW}neword~{If Error}{EndIf}{^Home}{&F3}{F7}{^End} {F2}{End}{F7}{^Home}{&F5}{^Home}{Send}c(s)first edit - extract text from comment, then remove commentPTHE M.C -should be extracted and edited in notepad to clear the final character-omessage-file=O.A-s9mail.netspace.net.au;; substitute your own mail serverTHE DATABASESGReference is made to the M database, M.ad is a list of email addressesK(text 55 I used) and M.awti for the title (text 30 I used), You will need Nto set up and populate the database. We use a popup box with proximity searchMto enter the address,just type in a starting letter at the prompt and enter.PYou can mouse the selection or cursor and enter. '+' prompts for a new address.:Also M.fi and M.su are text field for first and surnames.+Reference is also made to the MS database MSMA = memo fieldMSSUB = subject text fieldMSDATE = date fieldMSTIME = time fieldMSADrecipient adressMSCCcc addressMSSENDER sender OYou could comment out these references in the first instance, it adds a recordfor each message sent. FINALLYMTHE PROGRAM - take note of above instructions - for privacy,personal detailsBshould have been * 'd out - if I have missed any - please delete.NI have not cleaned up and now that the config version is in use it needs someNmore editing I notice, still works if you press {!f6} from subject first timeMaround. The O.A and M.C are sent to several directories (sendemail should bePthere also), this is because I found some variability to where Enable put me atQthe command prompt when I was manually sending by s.bat from the command prompt.MIf you receive or download this file as an Enable file all characters shouldObe intact, otherwise you will need to put the box characters (popup and screen1displays) and character colours, attributes etc.g.report division ;; 70706 exec_dos and modified config m#c and send separate mails to recipient and cc<.define sys:date using "dd/mm/y";; Australian format date.define lput3 as integer 1.define weewin as memo.define lawti[4] as text 30.define puts[4] as text 55.define n as integer 1.define fldnum as integer 1.define fldcnt = 4.define f as text 30.define n as integer 2.define yn as logical.define whosmtp as text 30A.define smtp = "mail."&@trim(@lc(whosmtp)) ;; was smtp not mail.define send as text 240.define send = "sm -f "&@trim(puts[1])&" -t "&@trim(puts[2])&@if(puts[3]='$@$'," -cc "&@trim(puts[3]),"")&" -u "&@trim(puts[4])&' -o config=m#c'R.intro ;; s#bat needs to be <=102 characters by the looks for exec_dos to handle .open ms ".let f="dbindoff#netspace.net.au" .maxscreen.reformat offK.gosub from;;different users - different senders so replies are received#.IF @ID(1,2)='E6' OR @ID(1,2)='D6'A.let puts[1] = "dbindoff#netspace.net.au" ;; *#netspace.net.au .let lawti[1]= "David Bindoff "7.elseif @ID(1,2)='E1' OR @ID(1,2)='D1'OR @ID(1,2)='D7' .let puts[1] = "*@ *.com.au".let Lawti[1]= "* *"'.elseif @ID(1,2)='E2' OR @ID(1,2)='D2'%.let puts[1] = "accounts@ *.com.au"'.let Lawti[1]= "Accounts at * *" '.elseif @ID(1,2)='E3' OR @ID(1,2)='D3' .let puts[1] = "*@ *.com.au".let Lawti[1]= "* * "'.elseif @ID(1,2)='E3' OR @ID(1,2)='D3'&.let puts[1] = "warehouse@ *.com.au"&.let Lawti[1]= "Warehouse at * *").else;;if @ID(1,2)='E1' OR @ID(1,2)='D1'%.let puts[1] = " *#netspace.net.au".let Lawti[1]= "* * ".endif;;.let puts[2] = f*;;.let puts[3] = "enableoa@thogscave.org".let puts[3] = ""&;;.let puts[4] = "The New EnableMail".let puts[4] = "" .let yn=1A  .macro {F9}wls{6x}{Down}{Up}{9x}{Right}{3x}{Left}{Esc}{Home} .input weewin .clrscreen.gosub sdesign.let fldnum = 1.while fldnum <=5 .escape off%.input (fldnum+1,12,55) puts[fldnum] .if sys:lchar=283 .escape onb .macro {esc}{&end}{gotow}neword~{send}(s)escaped from email address alt/f9 e to start again~ .input .endif ;;.escape on .if fldnum=2  .read m index m.ad=puts[2]7 .if (puts[2]=' ' or m.sys:record=0) and puts[2]<>'+'  .escape off> .begin popup "",6,1,20,78,"ĿĴ",m,m.ad,puts[2],U ",,,0,0,"email address: ", ,"r","",m.ad{30},m.awti{20},m.mfi{15},m.msu{15};7.if SYS:LCHAR = 7181;; Scan code for Enter key.let puts[2]=m.ad .LET lawti[2]=m.awti .elseif sys:lchar=283 .escape onb .macro {esc}{&end}{gotow}neword~{send}(s)escaped from email address alt/f9 e to start again~ .input .endif  .escape on$ .macro {Voff}{&Home}{Esc}{Von} .screenpos(3,12) [m.ad ]  .elseif puts[2]='+'#  .input 'new email address'm.ad  .write m  .let puts[2]=m.ad .screenpos(3,12) [m.ad ]  .endif  .elseif fldnum=3  .read m index m.ad=puts[3]9  .if puts[3]<>' ' and m.sys:record=0 and puts[3]<>'+'  .escape off> .begin popup "",6,1,20,78,"ĿĴ",m,m.ad,puts[3],V ",,,0,0,"email address: ",,"r","",m.ad{30},m.awti{20},m.mfi{15},m.msu{15};7.if SYS:LCHAR = 7181;; Scan code for Enter key.let puts[3]=m.ad .LET lawti[3]=m.awti .elseif sys:lchar=283 .escape onb .macro {esc}{&end}{gotow}neword~{send}(s)escaped from email address alt/f9 e to start again~ .input .endif  .escape on$ .macro {Voff}{&Home}{Esc}{Von} .screenpos(4,12) [m.ad ]  .elseif puts[3]='+'#  .input 'new email address'm.ad  .write m  .let puts[3]=m.ad .screenpos(4,12) [m.ad ]  .endif .endif.gosub sdesign.gosub keytest .endwhile.output screen off .reformat on ;;.output ASCII on enabmail.con .GOTO MISSOUT+ .output ASCII on we\windows\temp\s#batsm-f [puts[1]]-t [puts[2]]-u [puts[4]]-o config=m#c#;;.output ASCII close enabmail.con. .output ASCII close we\windows\temp\s#bat.if puts[3]<>' '.  .output ASCII on we\windows\temp\cc#batsm-f [puts[1]]-t [puts[3]]-u.if puts[4]=' 'mail.else [puts[4]].endif-o config=m#c#;;.output ASCII close enabmail.con0  .output ASCII close we\WINDOWS\temp\cc#bat .endif.LABEL MISSOUT.output screen onf;;.let send = "we\ACC\sendEmail -f "&puts[1]&" -t "&puts[2]&" -u "&puts[4]&" -o message-file=o#a " ;;.let send="copy o#a we\" .reformat on;;.screenpos(5,1) ;;[weewin0];;;;.reformat off.clrscreen (9,5,19,59).screenpos(15,1)T  Then final run through addresses and subject  @P  4type 4s 4and enter at prompt - message -sent successfully!  *-  type exit and enter at prompt  @  @  @ͼ 3;;.input (13,17) "EnableMail This Message? " yn .let yn=yes.if yn.input (1+1,11,55)" " puts[1] ;;.getchar .if sys:lchar=22784 .goto newout .elseif sys:lchar=12813 .gosub newedit .endif .input (2+1,11,55)" " puts[2].read m index m.ad=puts[2]  .escape off$ .if puts[2]=' ' or m.sys:record=0> .begin popup "",6,1,20,78,"ĿĴ",m,m.ad,puts[2],U ",,,0,0,"email address: ", ,"r","",m.ad{30},m.awti{20},m.mfi{15},m.msu{15};7.if SYS:LCHAR = 7181;; Scan code for Enter key.let puts[2]=m.ad .LET lawti[2]=m.awti .elseif sys:lchar=283 .escape onc .macro ~{esc}{&end}{gotow}neword~{send}(s)escaped from email address alt/f9 e to start again~ .input .endif  .escape on$ .macro {Voff}{&Home}{Esc}{Von} .screenpos(3,12) [m.ad ]  .endif  .if sys:lchar=22784 .goto newout .elseif sys:lchar=12813 .gosub newedit .endif.input (3+1,11,55)" " puts[3].if puts[3]<>' '.read m index m.ad=puts[3].endif(  .if puts[3]<>' ' and m.sys:record=0  .let lput3=1  .endif  .escape off .if sys:lchar=22784 .goto newout .elseif sys:lchar=12813 .gosub newedit .endif   .if lput3=1%> .begin popup "",6,1,20,78,"ĿĴ",m,m.ad,puts[3],U ",,,0,0,"email address: ", ,"r","",m.ad{30},m.awti{20},m.mfi{15},m.msu{15};7.if SYS:LCHAR = 7181;; Scan code for Enter key.let puts[3]=m.ad .LET lawti[3]=m.awti .elseif sys:lchar=283 .escape onc .macro ~{esc}{&end}{gotow}neword~{send}(s)escaped from email address alt/f9 e to start again~ .input .endif  .escape on$ .macro {Voff}{&Home}{Esc}{Von} .screenpos(4,12) [m.ad ]  .endif.input (4+1,11,55)" " puts[4] .if sys:lchar=22784 .goto newout .elseif sys:lchar=12813 .gosub newedit .endif.label newout.output screen off .REFORMAT ON+ .output ASCII on we\windows\temp\s#batsm-f [puts[1]]-t [puts[2]]-u.if puts[4]=' 'mail.else [puts[4]].endif-o config=m#c#;;.output ASCII close enabmail.con- .output ASCII close we\WINDOWS\temp\s#bat .if puts[3]<>' '.  .output ASCII on we\windows\temp\cc#batsm-f [puts[1]]-t [puts[3]]-u.if puts[4]=' 'mail.else [puts[4]].endif-o config=m#c#;;.output ASCII close enabmail.con0  .output ASCII close we\WINDOWS\temp\cc#bat .endif.REFORMAT OFF%.output ASCII on we\windows\temp\o#a%from: [lawti[1]]to: [lawti[2]].if puts[3]<>' '7cc : [lawti[3]]date:[sys:date ] time:[sys:time].else( 'date:[sys:date ] time:[sys:time].endif [weewin](.output ASCII close we\windows\temp\o#a.if puts[3]<>' '..exec_dos copy we\windows\temp\cc#bat we\enda8.exec_dos copy we\windows\temp\cc#bat we\docume~1\*-.exec_dos copy we\windows\temp\cc#bat we\acc.endif-.exec_dos copy we\windows\temp\s#bat we\enda7.exec_dos copy we\windows\temp\s#bat we\docume~1\*,.exec_dos copy we\windows\temp\s#bat we\acc ;;[smtp] +.exec_dos copy we\windows\temp\o#a we\enda5.exec_dos copy we\windows\temp\o#a we\docume~1\**.exec_dos copy we\windows\temp\o#a we\acc.exec_dos s#bat&.exec_dos cc#bat&.exec_dos cd\windows\temp.mconcat ("",weewin,msma) .let mssub=puts[4].let msdate=sys:date.let mstime=sys:time.let msad=puts[2].let mscc=puts[3].let mssender=puts[1].add ms;;.exec_dos s;;.exec_dos exit;;.exec_dos [send]  .escape onl  .macro {gotow}neword~{IF ERROR}{ENDIF}{&end}{ifbox}y{endif}{GOTOW}email~{gotow}email~{esc}{&end}{^f10}ys;;.macro {gotow}neword~{IF ERROR}{ENDIF}{&end}{ifbox}y{endif}{GOTOW}email~{&home}mo{gotow}email~{esc}{&end}{^f10}y  .input .elsee.macro {esc}{&end}{gotow}neword~{down}{&f7}{send}(s) email send aborted start again with alt/f9 e~.input.endif.exit .subroutines .label FROM3;;.input (13,20,24) "Your Email Address is.: " f .clrscreen..let whosmtp = @substr(f,@match(f,"@")+1,22)L;;.input (13,1,@len(whosmtp)) "Make correction if your Outgoing Mail is not;;smtp."whosmtp ;;.clrscreen;; [@repeat("*;;].;; * Your outgoing mail address is [smtp];;*;; [@repeat("*;;].return.label sdesign.screenpos (1,1)  @ͻ  From: [puts[1].]   To:[puts[2].]   cc:[puts[3].]  subj: [puts[4].]  @  @  @P  0Control/M - Open Message Window - second edit 0alt/end to exitT  Then final run through addresses and subject  0   @  T** TOr **4I  0Shift/f6  to 0send message as is - returns * MENU  @  @  @  *  @  @  @  @ͼ .return.label keytest .do case&  .case sys:lchar = 7181 ;; enter1  .let fldnum = @if(fldnum=fldcnt,1,fldnum+1)$  .case sys:lchar = 18432 ;; up3 .let fldnum = @if(fldnum=1,fldcnt,fldnum - 1)%  .case sys:lchar= 20480 ;; down1  .let fldnum = @if(fldnum=fldcnt,1,fldnum+1)&  .case sys:lchar = 19200 ;; left&  .let fldnum = @max(fldnum - 1,1)#  .case sys:lchar= 3849 ;; tab1  .let fldnum = @if(fldnum=fldcnt,1,fldnum+1)&  .case sys:lchar= 19712 ;; right1  .let fldnum = @if(fldnum=fldcnt,1,fldnum+1)&  .case sys:lchar = 18176 ;; home .let fldnum = 1%  .case sys:lchar= 18688 ;; pgup .let fldnum = 1%  .case sys:lchar= 20736 ;; pgdn .let fldnum = fldcnt*  .case sys:lchar = 3840 ;; shift/tab& .let fldnum = @max(fldnum - 1,1))  .case sys:lchar = 12813 ;; Contr/M1;;.macro {Pause}{Up}{&F3}{Home}{^F9}{^W}{CloseW}8;;.macro {Von}.Control/W TO CLOSE THIS WINDOW .P  .macro {send}(s) second edit - make adjustments if needed alt/end to finishA  .macro {F9}wls{6x}{Down}{Up}{9x}{Right}{3x}{Left}{Esc}{Home} .input weewin.let fldnum = 6 O  .case sys:lchar =22784 ;;shift/f6 7955 ;; Ctrl/S send the message as is .output screen off .REFORMAT ON. .output ASCII on we\windows\temp\s#batsm-f [puts[1]]-t [puts[2]]-u.if puts[4]=' 'mail.else [puts[4]].endif-o config=m#c #;;.output ASCII close enabmail.con0 .output ASCII close we\WINDOWS\temp\s#bat .if puts[3]<>' '.  .output ASCII on we\windows\temp\cc#batsm-f [puts[1]]-t [puts[3]]-u.if puts[4]=' 'mail.else [puts[4]].endif-o config=m#c#;;.output ASCII close enabmail.con0  .output ASCII close we\WINDOWS\temp\cc#bat .endif .REFORMAT OFF* .output ASCII on we\windows\temp\o#a%from: [lawti[1]]to: [lawti[2]].if puts[3]<>' '7cc : [lawti[3]]date:[sys:date ] time:[sys:time].else;( 'date:[sys:date ] time:[sys:time].endif [weewin]. .output ASCII close we\windows\temp\o#a ;;.status [send] .if puts[3]<>' '3 .exec_dos copy we\windows\temp\cc#bat we\enda< .exec_dos copy we\windows\temp\cc#bat we\docume~1\* 2 .exec_dos copy we\windows\temp\cc#bat we\acc .endif2 .exec_dos copy we\windows\temp\s#bat we\enda< .exec_dos copy we\windows\temp\s#bat we\docume~1\*1 .exec_dos copy we\windows\temp\s#bat we\acc0 .exec_dos copy we\windows\temp\o#a we\enda: .exec_dos copy we\windows\temp\o#a we\docume~1\*/ .exec_dos copy we\windows\temp\o#a we\acc .exec_dos s#bat .exec_dos cc#bat& .exec_dos cd\windows\temp .mtrimr(weewin,weewin) .mconcat ("",weewin,msma)  .let mssub=puts[4] .let msdate=sys:date .let mstime=sys:time .let msad=puts[2] .let mscc=puts[3] .let mssender=puts[1] .add ms .escape on2;;.macro {esc}{IF ERROR}{ENDIF}{&home}mo{^f10}ym .macro {gotow}neword~{IF ERROR}{ENDIF}{&end}{ifbox}y{endif}{GOTOW}email~{gotow}email~{esc}{&end}{^f10}yu;;.macro {gotow}neword~{IF ERROR}{ENDIF}{&end}{ifbox}y{endif}{GOTOW}email~{&home}mo{gotow}email~{esc}{&end}{^f10}y .input   .let fldnum=6 .endcase.return.label neweditP  .macro {send}(s) second edit - make adjustments if needed alt/end to finishA  .macro {F9}wls{6x}{Down}{Up}{9x}{Right}{3x}{Left}{Esc}{Home} .input weewin.let fldnum = 6 .return