Autor: Adam Płaszczyca (_555_at_irc.pl)
Data: Sat 03 May 2003 - 10:44:44 MET DST
Ninik <ninik_at_dominik.kei.pl> wrote:
> MIME-Version: 1.0
> Content-Type: text/plain; charset="iso-8859-2"
> Content-Transfer-Encoding: 8bit
> Czy ktoś z was mógłby teraz napisać skrypt, który by sprawdzał te linijki
> (a konkretnie ich początki bo może być np kodowanie na quoted-printable..)
> i je dodawał? Notorycznie brakuje linijki MIME... Nie znam się na REXXie
> dlatego proszę was o to bo wiem że porządnei w tym siedzicie...
A po co mam pisać? Już napisałem...
/*hau!*/
PARSE arg fmsg
rc=STREAM(fmsg,'c','OPEN')
msg.0=0
x=0
/*read whole message*/
do while lines(fmsg)>0
x=x+1
msg.x=linein(fmsg)
end
msg.0=x
h1=0
h2=0
h3=0
/*look for header part end if 'content' header present*/
x=1
he=0
do while msg.x<>''
if left(msg.x,13)='Mime-Version:' THEN h1=1
if left(msg.x,13)='Content-Type:' THEN h2=1
if left(msg.x,26)='Content-Transfer-Encoding:' THEN h3=1
x=x+1
end
he=x
if h1+h2+h3<3 then
do
rc=stream(fmsg,'C', 'SEEK 1')
do x=1 to msg.0
if x=he & h1=0 then rc=lineout(fmsg,'Mime-Version: 1.0')
if x=he & h2=0 then rc=lineout(fmsg,'Content-Type: text/plain; charset=ISO-8859-2')
if x=he & h3=0 then rc=lineout(fmsg,'Content-Transfer-Encoding: 8bit')
rc=lineout(fmsg,msg.x)
end
end
rc=stream(fmsg,'c','close')
return 0
> BTW:
> Czy macie może jakieś książki o REXXie? Najlepiej elektroniczne w PDF?
Poszukaj w IBM. Poza tym masz helpa w systemie...
-- ___________ (R) /_ _______ Adam 'Trzypion' Płaszczyca (+48 502) 122 688 ___/ /_ ___ ul. Ludwiki 1 m. 74, 01-226 Warszawa _______/ /_ IRC: _555, http://mike.oldfield.org.pl/ ___________/ mail: _555_at_irc.pl UIN: 4098313 GG: 3524356
To archiwum zostało wygenerowane przez hypermail 2.1.7 : Tue 18 May 2004 - 15:43:16 MET DST