Mail app and iPhone mail CSS signature

CSS signature in mail app is pretty cool. It’s small, neat and less problem displaying on other email clients. I managed to have both my signatures on the Leopard mail app and iPhone 3G mail app. Here is what I did. (The idea is from


  • Create one signature on Mail app to act as a dummy
  • Download or copy the CSS signature for Mail app (*.html) and then edit as you want (I used Coda, my favorite editor)

<div id=”sig” style=”line-height: 13px; margin: 6px 0; padding: 8px; border-top: 1px #999999 dotted; border-bottom: 1px #999999 dotted; font-family: ‘Lucida Grande’, Verdana, Arial, Sans-Serif; font-size: 11px; color: #333333;” >

<img src=”” alt=”me” width=”29″ height=”29″ style=”float: left; padding: 2px 6px 0 0;”>

<strong style=”color: #333333;”>Jiradett Kerdsri SQNLDR</strong>: Blog: <a href=”” style=”color: #999999; text-decoration: none; border-bottom: 1px #999999 dotted;”></a> <a href=”” title=”visit” style=”color: #339999; text-decoration: none; border-bottom: 1px #999999 dotted;”></a>| <a href=”” style=”color: #999999; text-decoration: none; border-bottom: 1px #999999 dotted;”> VCARD</a><br />

contact | <a href=”” style=”color: #999999; text-decoration: none; border-bottom: 1px #999999 dotted;”></a> – 6681-407-7024 | Twitter – <a href=”” style=”color: #999999; text-decoration: none; border-bottom: 1px #999999 dotted;”>jiradett</a></div>

  • Now go to ~Users/Library/Mail/Signatures you should see your dummy signature (*.webarchive) that you just created. Remember the file name, you’ll need it afterward.
  • Open the signature file with Safari, it should be displayed exactly as you want in your Email.
  • In Safari go to File > Save as . Under the Format, choose Web Archive

Save as in Safari

  • In Export As, make sure that it’s the same name as your dummy file. Overwrite the existing file with the new one.
  • Done, now in your Mail app, you should be able to see your new CSS signature appended at the end.

Css Signature in Mail app


It’s much easier in iPhone to edit the signature to replace the boring ‘Sent from my iPhone’ signature (from We just need to edit, /private/var/mobile/Library/Preferences/ . However, you’ll need a Jailbroken iPhone to edit that file. (I’m using iPhone 3G with 2.2 firmware and Fugu to SSH into the iPhone)

Edit file in iPhone

First we have to create the HTML code iPhone CSS signature shown below.

Now we need to add this code to signature.

The image showing on iPhone is encoded into base64 using

plist fileI download this file using Fugu to edit on my Mac with Property Editor then upload this file back to iPhone. It’s work very well so far.

Signature in iPhone

Leopard Mail unexpect quit

Today my Leopard Mail quits unexpectedly, so I can’t even start my mail. I don’t think I did something to Mail App at all, it just happened to quit. I start to think may be this is something that MobileMe and Google Mail have something todo with it since I have only these two settings in my Mail App. Thus, I have to start all over by delete from ~/Library/Preference and start Mail App again. However, I have to setup all the account all over again.

Push Gmail on your iPhone

I’m a huge fan of Gmail, which can do everything: Checking your other POP mail, forwarding mail etc. The only one functinality that would be killed is “PUSHING”. I think we gonna see it soon, because Yahoo already did it.

I tried to get Gmail to push to my iPhone, with a couple methods (web2mail Exchange server, YahooPush). After hours of experiment, the best method is forwarding Gmail to mobileMe and let Mobile me do the rest.

I have 3 seperate Email accounts so far (2 for my work and one for Google Apps), so I use Gmail to grab all the email into one single email and then use Gmail filter to labeling it. This lables will shows up in Mail App and iPhone Mail IMAP folder as well.

Then I just forward Gmail into my MobileMe account. This instruction is a good start. The trick is I have to set up SMTP for Gmail on iPhone in order to reply back the message via Gmail account.

For serveral other email accounts forwarding to Gmail like me, I have to set up fake POP mail so that I can use it to reply back via relevant email address.

Compose HTML email with

Send HTML Email
Send HTML Email

Today I found a question in Thai forum about how to compose HTML email with Mail in Leopard. I think this should be easy, right? However, it quite tricky than I though. I assume that Mail 3.4 should provide some functionality to help composing HTML email. In fact, Apple wants to make composing email easy for beginners but quite inadequate for advance users. Here is what I did.

HTML file on Safari
HTML file on Safari
  • Create HTML file and save it on your computer
  • Open that HTML with Safari
  • On Safari use File > Mail Content of this page

Default encoding on

I’d like to set Thai to be my default language in but I couldn’t find where to set it in Mail preference . So I did a little google and found the solution is very simple. In my case, Thai can use either Windows-874 and TIS-620. Here is the command that I run on Terminal and it works pretty well.

defaults write NSPreferredMailCharset “TIS-620”