Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use old style NeXTSTEP icons in Mail Apps
The normal way of associating a picture with an e-mail is using the Address Book. While this makes sense for the humans I'm interacting with, I don't want to add an address book entry for no-reply@flattr.com. You can get around this by using an old NeXTSTEP era mechanism that still works in Lion.

Just add a tiff file with a name e-mail.tiff into the folder ~/Library/Images/People, restart Mail.app and you are done.

So for Flattr e-mails, you would have the logo at ~/Library/Images/People/no-reply@flattr.com.tiff.

There are more details contained in this blog post.

[crarko adds: I haven't tested this one, but it should work with most, if not all, versions of Mail.]
    •    
  • Currently 4.75 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[4,219 views]  

Use old style NeXTSTEP icons in Mail | 11 comments | Create New Account
Click here to return to the 'Use old style NeXTSTEP icons in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use old style NeXTSTEP icons in Mail
Authored by: leamanc on Nov 15, '11 08:53:17AM

Very cool that this is still around from the NeXTSTEP days. Something that was common back then was to make a symlink to a particular tiff if a user had more than one email account. For example, if you made a joe@example.com.tiff file, and Joe also has the email address joe_example@gmail.com, you could symlink joe_example@gmail.com.tiff, pointing to joe@example.com.tiff, and see the same picture regardless of which email address Joe sent his message from. This was especially helpful back in the days of 40 MB hard drives, considering the size of your average TIFF file.

This might prove helpful in this case too, as you could use the same generic icon for all non-human accounts. With OS X being a mix of Mac OS and NeXTSTEP conventions, you might even be able to use aliases now, instead of symlinks.



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: lowbatteries on Nov 15, '11 09:29:15AM

This hint is great! I've been looking for a way to add favicons to my email, as I deal with a lot of firms and it would be nice to identify them by their website favicon. I wrote this little function that I put in my ~/.profile:

function mailfav()
{
	EMAIL=$1;
	DOMAIN=${EMAIL#*@}
	
	mkdir -p ~/Library/Images/People
	wget http://$DOMAIN/favicon.ico -O ~/Library/Images/People/$EMAIL.tiff
}

Now, if I want to download a favicon for a particular address, I run this command in a terminal:

	mailfav apps-noreply@google.com

This downloads the favicon at http://google.com/favicon.ico and saves it as "apps-noreply@google.com.tiff" in the correct folder.



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: j-beda on Nov 15, '11 10:49:52AM

pretty spiffy.

wget is no longer included by default in Mac OS X, so I suppose I should figure out how to rewrite that line with "curl"



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: j-beda on Nov 15, '11 10:59:40AM
Maybe something like this would work? I think "curl" also will do the directory creation stuff:
function mailfav()
{
        EMAIL=$1;
        DOMAIN=${EMAIL#*@}

        curl http://$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}
Unfortunately, for the example given ("mailfav apps-noreply@google.com") google.com seems to store its favicon at www.google.com, so the curl as listed gives a http file with a 301 - "moved" error in it. Anyone know how to get it to follow 301?
Edited on Nov 15, '11 11:15:51AM by j-beda


[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: eaganj on Nov 15, '11 02:18:44PM

just add the -L option to your curl command to follow redirects.



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: aMacUzur on Nov 15, '11 10:49:56PM

Add the "-L" parameter to curl to have it follow redirects, at least for instances like this one, anyway (read the man page for full details) — e.g.:

curl http://$DOMAIN/favicon.ico -L --output ~/Library/Images/People/$EMAIL.tiff --create-dirs

[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: the_webmaestro on Nov 16, '11 09:16:44AM

How about this (NOTE: Untested and I don't know if it'll work! I'm hoping from a little 'free' guru help here! ;-):

function mailfav()
{
        EMAIL=$1;
        DOMAIN=${EMAIL#*@}

        curl http://www.$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}

It's inelegant, and if the site re-directs to a domain *without* www. we have the same problem.
This should allow re-directs:

function mailfav()
{
        EMAIL=$1;
        DOMAIN=${EMAIL#*@}

        curl -L http://$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}

By default the limit is set to 50 re-directions, but you can improve on that by adding the --max-redirs flag.

---
Happy Dad


[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: j-beda on Nov 16, '11 11:17:49AM

That last one seems to work, at least with google.com



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: jsk on Nov 15, '11 01:01:07PM

I can confirm it works in Mail v2.1.3 in Tiger v10.4.11. You just have to create the folders in question as they are not part of a normal install.



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: f00b4r on Nov 17, '11 06:47:10AM

This also works with JPEG file which could make for much reduced setup time if doing manually.



[ Reply to This | # ]
Use old style NeXTSTEP icons in Mail
Authored by: BiL Castine on Nov 17, '11 09:55:02AM

This really begs to be wrapped in an AppleScript that can pull the email address and pass it to the shell script. beyond my capabilities, I'm afraid.



[ Reply to This | # ]