'===========================================================================
' Subject: HTML to E-MAIL                     Date: 10-19-03 (  :  )       
'  Author: Fred Buffington                    Code: PBCC                   
'  Origin: oasys@sbcglobal.net              Packet: HTML.ABC
'===========================================================================
'Fred Buffington
'oasys@sbcglobal.net

'To email all people from a web page containing mailto:emailaddress entries 
'After saving current email addresses from an html file (all in a table) with the dos editor. 
'this program reads that file, finds "mailto:" and gets the email address that follows. 
'it then sticks a semicolon at the end for separation and saves the new string to a file 
'In your email program you can then copy and paste this file to the to: or cc: lines 
#COMPILE EXE 
FUNCTION PBMAIN 
COLOR 15,1 
CLS 
OPEN "\webpage\nhs\email.lst" FOR BINARY AS #1 
lof1&=LOF(1) 
GET$ #1,lof1&,eml$ 
CLOSE #1 
eml$=LCASE$(eml$) 
M&=INSTR(eml$,"mailto:") 
WHILE M& 
N&=INSTR(M&+1,eml$,CHR$(34)) 
addy$=MID$(eml$,M&+7,N&-1-M&-7+1) 
newstr$=newstr$+addy$+";" 

M&=INSTR(N&+1,eml$,"mailto:") 
WEND 
LINE INPUT z$ 
IF newstr$<>"" THEN 
OPEN "nhsemlcc.txt" FOR OUTPUT AS #1 
PRINT #1,newstr$; 
CLOSE #1 
END IF 
CLOSE 
END FUNCTION 
