procmail
[Top] [All Lists]

RE: Recipe for truncating mail body & forwarding to cell phone

2001-07-17 00:29:38

I need to truncate my e-mails at 160 characters and forward them to
my cell phone as SMS messages.

Does that 160 characters also include the From and Subject information?

When trying to do this w/ my SMS service, I made a file with exactly 160
characters and sent it like this:


Mail me(_at_)mycell(_dot_)com < 160charmessage.txt

It was over the limit, so I had to muck with it.

(Actually I eventually gave up trying to truncate the message, and instead I
let the SMS service truncate it for me.  They only send the first 160
characters and I have to 'reply' if I want to see more)



Only the body should be truncated, the header is rewritten.

My SMS service truncates the headers on its own, are you sure that yours
does not also?


The only problem is
that the rules below would not truncate massages *exactly* at 160
chars, and even more annoying MIME and uuencode blocks are forwarded
without being truncated at all.

You will gain a newfound hatred of HTML emails also.

See http://www.peak.org/~luomat/procmail/antimime.txt for my method of
killing MIME formatted messages (including HTML) which works fairly well,
but I would only use it AFTER making a backup copy of each message that hits
the recipe, because it does make mistakes.



I searched the entire list archive but haven't found any useful
answers, can someone please give me a recipe for doing this?

I think the archive isn't always helpful for this because it really depends
somewhat on what you want to do


I don't understand why the messages don't always get truncated.

I wonder if trying 150 instead of 160 would help?


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>