Archive for category Mail

Critiquing Apple’s Mail & iCal

MacApper has a critique of Apple’s Mail. A few of their points are good. While Mail supports HTML stationary it’s simply too hard to add your own. (I’ve not encountered the attachment problem, but then I rarely use stationary myself since HTML doesn’t always render properly in other email clients) Several of the other problems are due to how limited iCal and Address Book are.

Realistically many people want something far more robust. I’d say 90% of my practical complaints of OSX reduce to iCal and Address Book being too limited.

Read the rest of this entry »

2 Comments

Displaying a SalesForce Contact’s Emails in Mail

SalesForce has a nice way of keeping track of emails from within SalesForce. But it tends to presume you do all your emailing from within Salesforce or use a program (like Maildrop) to sync your email from Apple’s Mail with SalesForce. This really isn’t terribly convenient. I do all my emailing from within Mail itself.

When I’m looking at a lead or contact though it would be nice to see a list of all our emails back and forth at a glance. The following script does that by creating a smart mailbox for the email address of the currently viewed lead or contact.

While I wrote this to access SalesForce it would be trivial to modify this to use a different source, such as Address Book.

Read the rest of this entry »

No Comments

Limits with Applescript and Mail

So I spent a big chunk of Friday night trying to write a script that would bring up emails for the current lead I was looking at in SalesForce. However I quickly ran up against some pretty serious limits in Mail’s Applescript support. Specifically there isn’t scripting of Smart Mailboxes (which are really just saved Spotlight searches).

Now you can try and hack around this using mdfind from the shell. You’ll be able to find the actual email files and tell Mail to open them. They’ll open fine. You’ll think that you can then get the relevant information from them so you can create a useful list. However you’ll then discover the Mail offers no way to get the message associated with a window.

This is a real big limit. Ideally what you would want to do is create and select smart mailboxes on the fly.

Read the rest of this entry »

1 Comment

Handling Spam

spam.jpgIf you are like me you use both server side spam/virus filtering with spamassassin and amavisd on a Linux box and then additional spam filtering on your Mac in Mail using either the built in spam filter or SpamSieve. (I use SpamSieve myself) This works out very well and I end up with only about 3 or 4 spam messages a day that get through both. Typically these are new kinds of spam and I want to train both my local and server spam filters about it. Training on the Mac side is easy. You just click to identify it as spam and your spam filter typically puts it in a spam folder. You should then check your spam folder daily for false positives.

Now I have several email addresses which, because of work, are publicly listed on a web page. So I get a lot of spam. Probably well over a thousand a day. So the amount of spam I end up with in my mail box, while annoying, is actually quite remarkable.

The problem is the training of spamassasin. So let me let you know how I do it.

Read the rest of this entry »

1 Comment

Fixing IMAP Mail Unread Counts

mail_message_count.jpgOK, this script fixes a problem in Mail that’s had me pulling my hair out for years. I’d come up with dozens of scripts trying to fix this one and nothing worked. Then someone gave a solution at Ars which had me slapping my head. It was so easy I can’t believe I didn’t think of it earlier. Doh! Of course once I found that solution I found lots of other hints to solve the problem (such as this one at OSX Hints).

The problem is that if you have IMAP folders Mail often loses the unread message count. This is especially true if you have multiple computers syncing to the same IMAP account. Mail assumes it’s the only mail client accessing the IMAP server. Of course the whole advantage of IMAP is you can share a single account with multiple computers. So for me I have my home computer, my work computer and my iPhone all accessing the IMAP server. But that means if one of those computers copies mail (say by a rule) into an IMAP directory the other servers don’t recognize it.

Of course this can be a disaster since you may have an important email in one of your directories but don’t even know it has arrived! (Yes – that’s happened to me more times than I care to admit)

Read the rest of this entry »

2 Comments

Get the File for a Mail Message

Sometime you may have the need to find the actual file associated with a particular mail message. The reasons you might wish to do this vary. I like to be able to set or read metadata associated with the mail message and I have a few scripts to do this. But you may have other reasons such as backing up particular messages.

Here’s an easy way to do it. First get the message id for the mail message. Then simply use mdfind to find the emlx file with that number. Apple stores the mail messages by their mail id which makes finding them fairly trivial. So if your message has an id of 459169 the file name would be 459160.emlx. Further, unless you are doing something quite particular on your system, this should be a unique name. That is mdfind should find only one copy. If you are doing something odd, like backing up onto the same hard drive, this might need some modification. But for most people it should work fine.

Read the rest of this entry »

No Comments

Automating Mail

As I think I’ve mentioned one of my most used scripts goes through currently selected emails, selects the body text and then does a bunch of parsing. In my case that parsing is to extract information my e-commerce site has, generate mailing labels, invoices and a confirmation email. However there probably are a ton of other uses for this sort of workflow.

I prefer to not have this totally automated for a variety of reasons (primarily making sure everything is setup and so I know what orders have come through). Some like to set up a rule in Mail that executes an Applescript. In my case though I use iKey to run a Python script simply because of the power Python gives me.

Here’s a nice little summary of how to do this in Python.

Read the rest of this entry »

No Comments

ToDos, iPhone, and iCal

Appigo ToDoI’ve reached that stage of life where things are complex enough I need to start having better ToDo management. Thus far I’ve just been sending emails to myself. I have an IMAP directory just for things I’m supposed to do. Then emails that include requests or tasks I need to do (say from a client or business partner) I can move into that directory. When I need to add a task I just write myself an email. The subject is the task and then I put an explanation as the content.

I then had a second IMAP director called Finished and when I finish a task, order, or so forth I’d put it into that directory

This has been working fine for a while but I really wanted something a little more robust. Plus things just have been getting a bit more complex. I had really, really expected Apple to add syncing ToDos along with Notes with the 3.0 software. Surprisingly they didn’t. (Which is weird since I find Notes to be fairly useless – especially with that ugly Comic Sans font)

Enter Appigo ToDo.

Read the rest of this entry »

No Comments

Fixing Paragraphs

A lot of people still like to do wrapped paragraphs as if they were still using traditional CRTs from the early 90′s. Typically these are folks exchanging email with people who demand unformatted text. If you want to do an indented quote or have at least some control over formatted you are out of luck with these luddites. (Yes, I know there are good reasons to avoid HTML mail – but formatting is important)

Here’s a quick script that will help. Save this as a text file named format_paragraph and put it in ~/bin. (If you don’t know much about using the terminal, that’s a folder named bin in your home directory – if it doesn’t exist create it)

Read the rest of this entry »

2 Comments