To make things easier for me, I created a PHP-based signature generator a while back and I’ve been using it to great success for quite a while now. Every one of my signatures has my name, my phone number, a link to my music site and a link to my blog — they only differ in which Feedburner headline animators they include (or none), so having a generator to automate this made a lot of sense. I also use it to create Michelle’s email signatures too.
You can download a stripped-down, simplified version of this email generator (and modify it to suit your own needs) from here: signatures.php (zipped). You can also click the image above to see what it looks like – no nonsense, very simple.
It adds the headers necessary for the signature, wraps your HTML in some default HTML and CSS that Apple creates for all email signatures and converts it to quoted-printable encoding. When the signature is generated, it will show you the HTML signature with the quoted-printable text below so you can copy and paste it into the correct file. Easy!
Here’s the default HTML that your HTML content will be wrapped in (this is what Apple includes with all signatures created in Mail.app):
<body style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;word-wrap:break-word;-webkit-nbsp-mode:space;-webkit-line-break:after-white-space;"> <br class="Apple-interchange-newline"> <div>YOUR HTML CONTENT WILL BE INSERTED HERE</div> </body> <br class="Apple-interchange-newline">
In my own signatures, I prefer to use
font-family:Helvetica, Arial, sans-serif; (not just Helvetica) since not all computers (Windows) have Helvetica installed. The only other thing is, from what I can tell, Apple uses a new
<div> for each new line in the signatures that Mail.app generates, but it doesn’t seem necessary and it still works without doing this.
When you’re done making your changes and have edited or replaced the correct files, lock the files in the Finder (highlight the files, click Command-Option-I to bring up the inspector and check the "Locked" box) and then open Mail again to test it out. I forgot to mention, you should probably close mail before you make any changes to your signature files, just in case…
If you sync your settings with iCloud and have more than one Mac, you may also want to paste these signatures into the corresponding files in the ~/Library/Mobile Documents/com~apple~mail/Data/Mail Data/Signatures folder (it contains the same files as the ~/Library/Mail/V2/MailData/Signatures folder, but with "ubiquitous_" prepended to the filenames.)
And to get the same signature on your iPhone, just create and save a new draft message with your HTML signature in Mail.app, then open that draft on your iPhone, select the text and copy it, switch to Settings->Mail, Contacts, Calendars and paste your signature on the "Signature" screen. Easy!
In a future article, I’ll explain the process to create a retina Feedburner Headline Animator so stay tuned! (You can subscribe to RSS, email updates or Twitter.)