The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS X Developer (http://hintsforums.macworld.com/forumdisplay.php?f=27)
-   -   read the number of attachments in mail using applescript? (http://hintsforums.macworld.com/showthread.php?t=27593)

MasterSwitch 09-02-2004 09:36 PM

read the number of attachments in mail using applescript?
 
hi guys

is there a way to read the number of attachments in a mail box using applescript or the shell command?

alternatively maybe the size of the selected messages?

thx
clive :rolleyes:

jbc 09-02-2004 10:18 PM

This depends on what mail client you're using and how it stores email messages. And using Applescript will depend on that client's Applescript library, if any. If your client uses standard mbox files you should in theory be able to get a count of all attachments in a mailbox using something like

grep -c "^Content-Disposition:\s+attachment" "/path/to/mboxfile"

If your messages are stored as separate messages, as for my email client, you'll probably need to pipe the output of a cli "find" command for your mail box folder into grep -c.

MasterSwitch 09-03-2004 08:43 AM

Quote:

Originally Posted by jbc
This depends on what mail client you're using and how it stores email messages. And using Applescript will depend on that client's Applescript library, if any. If your client uses standard mbox files you should in theory be able to get a count of all attachments in a mailbox using something like

grep -c "^Content-Disposition:\s+attachment" "/path/to/mboxfile"

hi jbc

im using mail 1.2.5 sorry i didnt include this info before, i posted really late and was ready to crawl into bed :)

unfortuantely it doesnt seem to work at least in the terminal window, and if it doesnt work in there im sure it wont work in my action script.
i know its the right path because i just dragged and dropped the path from the finder into the terminal window. i tried targeting the .mbox file and the parent folder, it didnt like either of them. unfortunately ive never used the grep command so the code youve given is greek to me :(

but thx for trying
clive

jbc 09-03-2004 11:12 AM

Ahh. I'll back up a bit.

Firstly, Mail.app's ".mbox" files are not standard mbox files; they're a special type of folder that contains other files that are usually hidden. If you click on a ".mbox" file with the control key down and select "Show Package Contents" from the contextual menu, you can see the contents of the folder. Fortunately one of the items a ".mbox" file contains *is* a standard mbox file, called just "mbox", that contains the messages for that particular mail box. So for your path you'll need to add "/mbox" to the end of the path to search the actuall mbox file.

The command line itself...grep is a utility for searching for lines within files that match a certain pattern. Normally it returns the lines that match. Had it a bit wrong, but here's basically what the line contains.

command: grep
options: -c (count matches instead of returning matches)
pattern: "^Content-Disposition:[ ]*attachment" (email header for an attachment part - note correction to handing of possible multiple spaces)
files to search: "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

If you try to put this inside an Applescript 'do shell script "..."', you'll need to escape the double-quotes by including a backslash or two before them. The grep line works okay for me run through the contextual menu.

bramley 09-03-2004 12:13 PM

Masterswitch,

The following code will give you the number of attachments for a message in Mail 1.3.9. It'll probably work in Mail 1.2.5.

Code:

tell application "Mail"
        tell mailbox "WHATEVER"
                tell message X -- substitute number of message for X
                        set attach_count to count of attachments of content
                end tell
        end tell
display dialog "The number of attachments: " & attach_count as string
end tell


jbc 09-03-2004 01:38 PM

If I understand the question, MasterSwitch is trying to get the number of attachments in a mail box, not an individual message. Don't have access to OS X or Mail's dictionary at the moment, but I think that means you need a "repeat with i from 1 to number of messages in mailbox" loop or some such. Then you can just add the individual counts together as you go along.

MasterSwitch 09-03-2004 09:11 PM

[QUOTE=jbc]
The command line itself...grep is a utility for searching for lines within files that match a certain pattern. Normally it returns the lines that match. Had it a bit wrong, but here's basically what the line contains.

command: grep
options: -c (count matches instead of returning matches)
pattern: "^Content-Disposition:[ ]*attachment" (email header for an attachment part - note correction to handing of possible multiple spaces)
files to search: "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

QUOTE]

hi jbc

grep -c "^Content-Disposition:[ ]*attachment" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

this almost works, it got 1 out of 3 mailboxes right
this is not the first time unix commands dont seem to give the expected result
i have an uptime command which someone gave me, it is suposed to cut lots of crap just leaving the up hours or days, it only works about half the time. before i got this command i worked on my own commands, i built a calender alowing for leap years etc and stored the login time in a text file. so sometimes my applescript hours matches the uptime command, sometimes i get gibberish with the uptime command.
im not really surpised the command isnt working properly, unix is a very complex language to get right :(

ill have another look at my attachments against the command count tomorrow, and the applescript above
btw, it was a total count i wanted :)

thx and nite all
clive :eek:

bramley 09-04-2004 12:11 PM

[QUOTE=MasterSwitch]
Quote:

Originally Posted by jbc
btw, it was a total count i wanted :)

Ah fair point - but it wouldn't hurt to check that the attachments on a single message can be read. After all I didn't say it was possible, just very probable. :)

jbc 09-04-2004 01:56 PM

clive-

Had a thought on why your counts might be off with the grep search: we may be keying in on the wrong thing with the grep search.

The Content-Disposition header is where a file is declared as "attachment" or "inline". So what if a jpeg is "inline"? Or what about the case where a background gif is referenced in html by cid and has no Content-Disposition as all? I'm guessing you'd still consider both of these "attachments".

As a first approximation, you might try a search like

egrep -c -i "^(.*;)?[[:space:]]+name=\".*\"" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

This will catch even the gifs that are only referenced by cid (it tries to match the name tag in the Content-Type header). If you're not concerned about these, you could change "name" to "filename":

egrep -c -i "^(.*;)?[[:space:]]+filename=\".*\"" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

This is approximate because grep does linewise matching, so you can't match over multiple lines. You could use something like perl to do a more specific search. I've upgraded my grep to the latest version of GNU grep, but hopefully these will work with the stock OSX grep as well.

MasterSwitch 09-04-2004 07:42 PM

Quote:

Originally Posted by jbc
clive-
egrep -c -i "^(.*;)?[[:space:]]+filename=\".*\"" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

hi jbc

ive not tried this yet but wanted to say
i dont sit here and open each email and count each attachment
and im awear that there are attachments that arnt obvious
i have been using the attachment tab to see how many attachments should be in a mailbox and comparing that way.
i dont know if its worth counting gifs, sometimes the attachments i want to save are gifs, but then of course they dont take up as much room as the jpgs and other larger attachments can take.
what i want is a script that will read the downloadable attachments, for a very simple reason. i have a script that will do the download, but if there are only emails in that inbox that dont have any attachments, the script fails. its so my hard disk doesnt get full when i go away for a break.
so when i tell my script to click the menu item "download attahcments" that menu item has to be highlighted, it wont if there are no attachments.

btw, what is
egrep?

MasterSwitch 09-04-2004 08:03 PM

Quote:

Originally Posted by jbc
clive-
Code:

egrep -c -i "^(.*;)?[[:space:]]+name=\".*\"" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

egrep -c -i "^(.*;)?[[:space:]]+filename=\".*\"" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"


unfortunately neither lines of code would assemble, the terminal reported
Unmatched ".
however to me it looks like there are the right number of open and closed inverted comma's, so not really sure what would be wrong

clive :confused:

jbc 09-04-2004 08:26 PM

Okay, I'm officially lost. It sounds like rather than checking mailboxes on your computer, you're trying to check for attachments on the server before even downloading them to your machine, so presumably this is an IMAP account? If it's set up for POP, the attachments should have already been downloaded. Or are you talking about extracting the attachments that are in the email on your computer and saving a copy to disk somewhere?

It might be easier to try to get your Applescript to fail gracefully rather than grepping files. Seems like it might be possible to check the status of the "download attachments" menu item using System Events (I can't find this menu item in my Mail btw, but I don't use IMAP); bramley might have a better idea about this. Also if you set up a loop to process each message using bramley's model above, you could check Mail's evaluation of whether there's attachments or not and process only messages with attachments. But I'm really unclear on what you're trying to do here.

egrep is the same as "grep -E", which uses extended regular expressions and allows more flexibility in pattern matching. Check "man grep" if you're curious about this. Just saw your post about the unmatched ". There should be four regular " and two escaped " (\"), so not sure what terminal is complaining about, unless it's some difference in the grep versions we're using.

One final thought: if you have to worry about your hd filling up because of the size of attachments, maybe it's time to invest in a new larger hard drive?

Brad

MasterSwitch 09-04-2004 09:08 PM

Quote:

Originally Posted by jbc
Code:

grep -c "^Content-Disposition:\s+attachment" "/path/to/mboxfile"

hi again jbc

ok ive now tested the above code, as i said above, im interested in the number of attachments mail considers it can download from a list of emails, so in one in box i downloaded a load of attachments, mostly txt attachments from a bounced email plus a few other odds n sods. the result from the download was
-- actual 152 measured 182
i did another mailbox with mostly picture type files, the result from the download was
-- actual 126 measured 52

actual is the number of files resulting from the download to disk
measured is the result of running the script in the terminal

so im afraid that script isnt really good enough :(

clive

MasterSwitch 09-04-2004 09:37 PM

Quote:

Originally Posted by jbc
is an IMAP account? If it's set up for POP, the attachments should have already been downloaded.

nope its a pop account, i can download the shown attachments off line
Quote:

Originally Posted by jbc
Or are you talking about extracting the attachments that are in the email on your computer and saving a copy to disk somewhere?

yep im saving the attachments, to a different disk then erasing the emails
Quote:

Originally Posted by jbc
Seems like it might be possible to check the status of the "download attachments" menu item using System Events (I can't find this menu item in my Mail btw, but I don't use IMAP);

its "Save Attachments..." and its in the file menu, though of course it could be different in panther.
the save attachments is right in the middle of system event statement but i have no idea how to test if that menu option is active and it would be quite complex code to exit the script at that point. also it would involve application activity to do the test. the mailbox that would get full is a special mailbox, with files that have attachments and not much else of interest are filtered. although when im here i do scan the emails to see if there is anything of interest, when im not here, downloading the attachments will be more than enough. the best solution is to activate the script when a message gets sent to that inbox, then test for attachments on all the mail in that mailbox. if there are none, simply exit the script and test again on the next download, less processing power :)
Quote:

Originally Posted by jbc
bramley might have a better idea about this. Also if you set up a loop to process each message using bramley's model above, you could check Mail's evaluation of whether there's attachments or not and process only messages with attachments. But I'm really unclear on what you're trying to do here.

i often find it easier to concentrait on either unix or applescript, trying to do both at the same time is not so easy for me. i have full intention on testing the applescript, its 2am in the morning here, i dont think that clearly at this time in the morning :D
Quote:

Originally Posted by jbc

egrep is the same as "grep -E", which uses extended regular expressions and allows more flexibility in pattern matching. Check "man grep" if you're curious about this. Just saw your post about the unmatched ". There should be four regular " and two escaped " (\"), so not sure what terminal is complaining about, unless it's some difference in the grep versions we're using.

i knew it was about closing them, like closing brackets, and i have no idea why its complaining either. i guess it could be a different grep, i could try it again as grep -E -c -i
i have to say i dont like the manual, though i guess i will get used to it eventually, i do have mac osx in a nutshell which is much more intuative :p
Quote:

Originally Posted by jbc

One final thought: if you have to worry about your hd filling up because of the size of attachments, maybe it's time to invest in a new larger hard drive?

Brad

ok i know your not having a dig but there are reasons i write such scripts and still run jaguar NO MONEY
i have to work with what ive got for now.
main disk is just 6 gig, so that is only ever going to be the space for the o/s
another internal 9gig that i can startup from
apparently i can put in a 40gig in its place which will cost me £70 about $110 and i have an external 40gig
i would like panther, another £70
then tiger will be out next year
i would like to upgrade from flash mx to 2004 professional, thats about £300
and the list goes on and on
btw, im unemployed.......
and no i dont like admiting that on here
:(

clive

MasterSwitch 09-04-2004 09:47 PM

Quote:

Originally Posted by bramley
The following code will give you the number of attachments for a message in Mail 1.3.9. It'll probably work in Mail 1.2.5.

Code:

tell application "Mail"
        tell mailbox "WHATEVER"
                tell message X -- substitute number of message for X
                        set attach_count to count of attachments of content
                end tell
        end tell
display dialog "The number of attachments: " & attach_count as string
end tell


hi bramley

finally got round to putting your code in a script, first problem and its one i dont know a way around,
attachments
should i assume be a command, ie, in blue if you use default colors
well in jaguar there is no attachment command. applescript reads it as a variable in green. i did actually look through the mail dictionary and try to read the attachments before posting and couldnt see an attachment or variation there of, command, before i posted :(
i guess they sorted that problem in panther

back to square one :(

clive

jbc 09-05-2004 02:30 AM

Thanks for all the detail; I have a clearer picture now. Here's a few notes for when you wake up (I assume you're asleep by now!), not necessarily in order.

The "attachment" in bramley's code *is* in blue in Panther's Script Editor, so this is apparently something that's been added to the newer version of Mail. Which means you're out of luck there, unless it runs on Jaguar as well.

I reverted to OS X's native grep, and the egrep script still works; no complaints from Terminal about mismatched " either. But they could have updated the grep that ships with Panther.

There's a number of tools already on your disk that should allow you to search the email headers. And it sounds as if you don't really even need a count, just a check to see if there's a single attachment in the mailbox (since you've saved and deleted the emails for the previous ones)?

You might try something simple first. Say something like

grep -c -i "filename=\".*\"" "/path/to/mbox"

See how this matches up with Mail's counts (assuming you don't run into quote problems again). If we can identify what is a "savable" attachment for Mail, you should be in business as far as telling whether to run your script or not. You could even look at the raw messages to try to see whether Mail is queing in on the "name=" tag of the Content-Type header or the "filename=" tag of the Content-Disposition header. I don't use Mail, but if you run into difficulties, I can import an mbox from my mail client and test it here.

Re: NO MONEY...you're correct, no digs intended. I'm in more or less in the same boat myself; had to scrape to upgrade to Panther.

MasterSwitch 09-05-2004 07:18 AM

Quote:

Originally Posted by jbc
Thanks for all the detail; I have a clearer picture now. Here's a few notes for when you wake up (I assume you're asleep by now!), not necessarily in order.

heehee yep, even a genius needs his rest ;)
Quote:


The "attachment" in bramley's code *is* in blue in Panther's Script Editor, so this is apparently something that's been added to the newer version of Mail. Which means you're out of luck there, unless it runs on Jaguar as well.
no, it wont, it is just gibberish, set the count of the variable "attachments" to the variable "myCount"
Quote:


I reverted to OS X's native grep, and the egrep script still works; no complaints from Terminal about mismatched " either. But they could have updated the grep that ships with Panther.
maybe but i have no way of knowing :(
Quote:


There's a number of tools already on your disk that should allow you to search the email headers. And it sounds as if you don't really even need a count, just a check to see if there's a single attachment in the mailbox (since you've saved and deleted the emails for the previous ones)?
i have no idea what these would be
Quote:


You might try something simple first. Say something like

grep -c -i "filename=\".*\"" "/path/to/mbox"
this still gets missmatched "
Code:

grep -c -i "filename=.*" "/Users/Clive/Library/Mail/Clive/INBOX.mbox/mbox"
this doesnt
but now youve cut it down a bit i get a bit more what your trying to do
your looking for "filename" or "name" in the email headers?
specificly ones with any dot ".*" extension
so you could search for jpeg and do something like ".jp*"

Quote:


See how this matches up with Mail's counts (assuming you don't run into quote problems again). If we can identify what is a "savable" attachment for Mail, you should be in business as far as telling whether to run your script or not. You could even look at the raw messages to try to see whether Mail is queing in on the "name=" tag of the Content-Type header or the "filename=" tag of the Content-Disposition header. I don't use Mail, but if you run into difficulties, I can import an mbox from my mail client and test it here.
anyway this code still isnt successful, it reads 65 attachments with "filename" and 207 with "name" and downloads 104
Quote:

Re: NO MONEY...you're correct, no digs intended. I'm in more or less in the same boat myself; had to scrape to upgrade to Panther.
and you are now going to have to scrap to save up for tiger early next year, i really hate apple for not allowing those that have an earlier o/s to upgrade at say half price or something, and i think tiger might possibly make quite a few boxes obsolete, mine included :(
its talking about 64bit processing, and i dont know but i think my box is probably only capable of 32bit processing :(

talk soon
clive :)

MasterSwitch 09-05-2004 07:27 AM

Quote:

Originally Posted by jbc
Code:

egrep -c -i "^(.*;)?[[:space:]]+filename=.*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"
you could change "name" to "filename":

Code:

egrep -c -i "^(.*;)?[[:space:]]+name=.*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

taking out those escaped quotes on these lines of code, and targeting the same mailbox as above the string
"filename" reads 66 attachments
"name" reads 88 attachments

but still not 104 the actual amount downloaded :(

MasterSwitch 09-05-2004 08:44 AM

Quote:

Originally Posted by jbc

Had a thought on why your counts might be off with the grep search: we may be keying in on the wrong thing with the grep search.

The Content-Disposition header is where a file is declared as "attachment" or "inline". So what if a jpeg is "inline"? Or what about the case where a background gif is referenced in html by cid and has no Content-Disposition as all? I'm guessing you'd still consider both of these "attachments".

As a first approximation, you might try a search like
Code:

egrep -c -i "^(.*;)?[[:space:]]+name=.*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"
This will catch even the gifs that are only referenced by cid (it tries to match the name tag in the Content-Type header). If you're not concerned about these, you could change "name" to "filename":
Code:

egrep -c -i "^(.*;)?[[:space:]]+filename=.*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"

just been testing and counting etc
there are a few lines of code that keep popping up 88 attachments
some of these emails download "image.tiff" files, however in the raw source i cant find a reference to "image.tiff"
im not going to open all 25 emails but 25 + 88 equals 113
take away the few without attachments that are downloadable and its much closer to the 107 that i can download from those selected mails. the problem with this theory is there are 34 "image.tiff" files, so more than one per email.
these two lines of code return 88 attachments
Code:

egrep -c -i "Content-disposition:*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"
Code:

egrep -c -i "^(.*;)?[[:space:]]+name=*.*" "/Users/clive/Library/Mail/Mailboxes/Drafts.mbox/mbox"
clive

rusto 09-05-2004 08:49 AM

Quote:

and i dont know but i think my box is probably only capable of 32bit processing
If you don't have a G5, you are doing 32 bit processing. In fact, those of us WITH G5s are pretty much doing 32 bit right now as well. But not to worry, I believe Tiger is slated to work with pretty much the same machines that Jaguar does...but that is a topic for another thread.

MasterSwitch 09-05-2004 08:59 AM

Quote:

Originally Posted by rusto
If you don't have a G5, you are doing 32 bit processing. In fact, those of us WITH G5s are pretty much doing 32 bit right now as well. But not to worry, I believe Tiger is slated to work with pretty much the same machines that Jaguar does...but that is a topic for another thread.

hmmmm do you have a link for the other thread that you could post in this one?

rusto 09-05-2004 09:59 AM

Here's one

Here's the other

bramley 09-05-2004 01:47 PM

Quote:

Originally Posted by MasterSwitch
hi bramley

finally got round to putting your code in a script, first problem and its one i dont know a way around,
attachments
should i assume be a command, ie, in blue if you use default colors

Well, I'm flabbergasted! Just to check - in Mail dictionary, attachment (in Panther) is the first item under "Text Suite".

Don't forget I only said it was very probable, not highly probable. :)

jbc 09-05-2004 02:33 PM

Finally dumped out an mbox with lots of attachments, then sliced and diced in Terminal to see what was happening. Main problem seems to be an inconsistency about how different clients put together email headings; I doubt you will ever get an accurate count of how many files Mail will extract without examining each message separately.

The good news is you don't really need a full count, and our checks *are* actually working! Turns out the result of this expression

grep -i "name=\".*\"" "/path/to/mbox"

was all "name=" tags from the Content-Type headers and all "filename=" tags from the Content-Disposition headers, 445 total...and nothing else (I was afraid it would match attributes in html parts). If *any* of these are matched, it should indicate an attachment that Mail can save. So you should be able to do a test like

tcount=`grep -i -c "name=\".*\"" "/path/to/mbox"`
if test $tcount -ne 0
then
#run save script for mail box here
fi

or in Applescript...

set tcount to do shell script "grep -i -c \"name=\\\".*\\\"\" \"/path/to/mbox\""
if tcount is not "0" then
--run save script for mail box here
end if

Btw, the regular expression "name=\".*\"" is simply looking for "name=" followed by zero or more characters surrounded by double-quotes, which is why it also finds "filename="???"".

Best regards,
Brad

MasterSwitch 09-05-2004 08:27 PM

1 Attachment(s)
Quote:

Originally Posted by bramley
Well, I'm flabbergasted! Just to check - in Mail dictionary, attachment (in Panther) is the first item under "Text Suite".

Don't forget I only said it was very probable, not highly probable. :)

hi bramley

well when i looked before i didnt see anything on attachments
there is as you say an attachment section
ill play around with the commands that are listed tomorrow, though there is no obvious command to read the number of attachments
anyway, ive attached a screen shot of the dictionary

MasterSwitch 09-05-2004 08:44 PM

Quote:

Originally Posted by jbc
I doubt you will ever get an accurate count of how many files Mail will extract without examining each message separately.

The good news is you don't really need a full count, and our checks *are* actually working! Turns out the result of this expression
or in Applescript...

set tcount to do shell script "grep -i -c \"name=\\\".*\\\"\" \"/path/to/mbox\""
if tcount is not "0" then
--run save script for mail box here
end if

Best regards,
Brad

actually ive known i dont NEED an acurate read for some time, i wouldnt check for 0, i would check for 20 or something and hope that there was at least one downloadable attachment in amonst them.
that wasnt really the point, the point was we were trying to get an accurate read, and it was fun trying to do it
plus if it was accurate, the script would never fail, with an aprox count, there will be very rare occationsions when it will
sorry its just the perfectionist in me, im like a lion with a kill, i wont let it go till ive had my fill :D

my web sites are like that too and i get told off for it, they tell me if its working dont try to fix all the bugs, just move on to the next one, but i like to build sites with no bugs, then i dont have to find out what some idiot has done later to make the site fail

ho hum, anyway, if you have any other thoughts i would be happy to hear and test them.....
ive had jaguar now for about 2 years i think
at the start i was told you could not wake a computer from energy saver sleep with actionscript, 2 years later im reporting and bouncing spam while im asleep :D

o/s x is much more powerful than o/s 9
there probably is an answer, we just havent found it yet

sweet dreams
hitting the hay

jbc 09-05-2004 09:44 PM

Quote:

Originally Posted by MasterSwitch
actually ive known i dont NEED an acurate read for some time, i wouldnt check for 0, i would check for 20 or something and hope that there was at least one downloadable attachment in amonst them.
that wasnt really the point, the point was we were trying to get an accurate read, and it was fun trying to do it

Well, if you want to go for the gold, you'd probably be best off looking at something like a Perl script. I think the headers I'm suggesting are an accurate indicator of a savable attachment; the problem is that a particular message or MIME part may contain only one or both of these. So you need to check on a per message and per MIME part basis which headers are there to get an accurate count. A Perl script can be made to pick out the messages and parts; this isn't really possible with something like grep.

You might also be able to tackle this with procmail, I'm not sure (not much of a Perl or procmail expert).

Alternatively, you could set up a mail server (MTA) to deal with the attachments when they arrive with the email. My exim server writes the extension of each attachment into an additional header, so I can see how many and what type of attachments are there from looking at the log, before ever opening the email.

It's certainly possible, but may be a lot of work!

MasterSwitch 09-07-2004 09:23 AM

Quote:

Originally Posted by jbc
Well, if you want to go for the gold, you'd probably be best off looking at something like a Perl script.
You might also be able to tackle this with procmail, I'm not sure (not much of a Perl or procmail expert).
It's certainly possible, but may be a lot of work!

hi brad

ok, i guess we just have to leave it as aprox, at least until i get panther or tiger, or one of those commands for mail as dictionary attachments actually reads the number.
i dont mind work, but theres no point in doing a lot of work for something that kinda works, at least i can do some sort of test :)
as for perl, i used to have it working in o/s 9, but ive never managed to work out how to use it in o/s 10, or php for that matter :(

thx again


All times are GMT -5. The time now is 05:46 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.