How to get mail.app to grab its signature from a website

Discussion in 'Mac Programming' started by RedTomato, Jul 29, 2010.

  1. RedTomato macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #1
    Hiya,

    I work for a theatre company who are all Mac users. They want to promote their latest play or project or whatever in their email signature. It's usually a picture and a few words on a bar of solid colour.

    I've done a bit of HTML code which does the coloured bar, and grabs an image from our website, and shows a few words. It's just a 3 section table, with cell 1 being the image and cell 2 is the words and cell 3 is a spacer.

    Using Safari I saved it as a webarchive, then dropped it into user/library/mail/signatures and replaced one of the existing signatures. It shows up fine as a HTML signature

    The nice thing about it is that it auto-reformats itself as people open their messages in various different sized windows.

    The problem I have is that every time the wording changes, or the new play has a sightly different image layout, after rewriting the code (which I don't mind) I have to go around everyone's computers and change them all manually to use the new code for the new signature.

    Is there a way of just slapping the code on a webpage, and then setting mail.app to go and get it from there?

    Many thanks RedTomato
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Not tried this but you could try using an iframe in the signature that "imports" the web page you want...
     
  3. RedTomato thread starter macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #3
    Egads! Thanks for the hint. I knew about iframes on webpages, but didn't think of applying them to email signatures - iframes haven't crossed my mind since about 2005.

    At first using an iframe in the sig didn't work - it got stripped out - but including some rich text in the message seems to help force the iframe to be included. (ran into this when I started using HTML sigs).

    Many thanks RobbieDuncan, now all I've gotta do is persuade our web design / hosting company, who operate an extremely strict CMS policy, to let me have a page to use to fill up the iFrame.
     
  4. yardie macrumors newbie

    Joined:
    Oct 13, 2008
    #4
    Here's how you do, this is how I did it and it's great, now iframes or anything

    1. Create the page you want in HTML. Open it in Safari and save it as a webpart.

    2. Copy that webpart file to /Users/$username/Library/Mail/Signatures. If you have a signature file already you can replace it with your webpart file. It is long list of numbers and letters (GUID). Restart mail and select the signature file. It won't display correctly in the signature preview, but it should be fine if you create a new message.
     
  5. RedTomato thread starter macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #5
    Hi Yardie,

    if you read my first post, that's exactly what I've been doing. It's fine every now and then, but it became a pain as I had to go around all the staff and computers and update them all every time we had a new play or new project to advertise in our signatures.

    So that's why Robbie suggested using an iframe so the staff sigs would all redirect to a webpage that I can administer centrally.
     
  6. bennyb2 macrumors newbie

    Joined:
    Jul 24, 2012
    #6
    Your help would be much appreciated!

    I am also using this technique now after reading this thread... What is the "rich text" that you use in the message to help force the iframe to be included?

    Thank you!
     
  7. pknz macrumors 68020

    pknz

    Joined:
    Mar 22, 2005
    Location:
    NZ
    #7
    Yes, RedTomato could you enlighten us on the use of the iframe.

    Thanks.
     

Share This Page