OT: Mysterious line break and space
Sivakatirswami
katir at hindu.org
Sat Aug 6 20:43:58 EDT 2005
I use a Revolution app that I built to generate our daily "Hindu
Press International News" service.... (recently added RSS feed with
Andre's help)
It's pretty basic: the managing editor actually uses it: pastes some
daily stories into a field, the app then builds and uploads some web
pages from that and generates a multi-part text plus HTML email and I
pipe this out from sendMail which is running on his local box (OSX,
enabled with postFix) to our mail server: Communigate Pro. Simple
with Rev...
Once the file is built it goes out like this:
# fix endlines to unix and then save to file
replace numTochar(13) with numTochar (10) in tMsg
# save to disk (only way to pass it we could find...)
put ($HOME &"/Desktop/temp.txt") into tPath
put tMsg into url ("binfile:" & tPath)
# Do the shell thing and send mail
set the shellcommand to "/bin/sh"
put "cat " & quote & tPath & quote & " | sendmail -f
hpi.list at hindu.org " & (fld "to" of cd "staticText") into tCmd
# check on status
put shell(tCmd) into tResult
if tResult is empty then
answer "Mail was sent...." with "OK"
else
answer tResult with "OK"
delete file tPath
end if
Now we are noticing, that the loooong mac lines are
being broken at around 990 chars with a li
ne ending and space, like what you are see
ing here...
we see a return and a space introduced somewhere. In the plain text
version we get the full gremlin: a line break and a space. The html
version ignores the line break but we see a s pace... I suspect a
CRLF is being introduced somewhere in the pipeline and this is how it
ends up looking in mail.app. We are totally at a lost as to what to
do to fix this. I've examined the source all the way thru my script
and tMsg file that is piped to sendMail is "clean"
Any insights will be appreciated
Sivakatirswami
Himalayan Academy Publications
at Kauai's Hindu Monastery
katir at hindu.org
www.HimalayanAcademy.com,
www.HinduismToday.com
www.Gurudeva.org
www.Hindu.org
More information about the use-livecode
mailing list