SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html email for non html compliant clients

    Hi

    I got a nice html email from Apple advertising their new Power Mac today. My email comes via an internet based account and is dumped down into Outlook Express.

    My internet based account cannot read html email and I have crafted a few of my own only to find that they just appear as raw code when viewed online.

    However when I went online to check how the Apple email message apeared, within the internet account, there was a nice plain text message there saying that it was not readable and directing me to an online url version.

    So in summary Apple have sent me an email that when read in Outlook Express looks (graphically) great and when read in a non html environment looks fine as well by defaulting to a textual version.

    My question - how do they do that - how do they cater for html and non html in the same message??

    Would be really grateful for any help on this as so many of my clients want to do html emails now!

    Thanks
    gorillaweb is a small London based digital design agency.

  2. #2
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    I am researching the same problem and figured out this work-around. There must be someother way I am sure but let me knw what works for you.Usng Micosoft Outlook Express, click Message>New Message Using>Web Page. At this point you will be asked to neter URL of web page. Browse to location of file on hard disk using Explorer and copy/paste URL into window. Click OK. It creates an email which is viewable within the preview window as an HTML file.

  3. #3
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK that's a way of sending html email from Outlook Express - but my question is - how can you cater for html and non html recipients in the same message??

    ie how can you send one html email that will look as it should in an html compliant email client but when viewed in a non html email client (like an internet based account), won't look like a pile of code. Apple have done this as per my original posting.

    Probably not making myself clear. Thanks for your reponse anyway.

    Any other ideas people??
    gorillaweb is a small London based digital design agency.

  4. #4
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    One way of doing this is by using the special type "multipart/alternative". What it does, is it separates the newsletter into two parts, and the email client can choose which to display based on its capabilities.

    Be warned: if an email client does not support text/html, it may not support multipart/alternative either. In your case (with the apple message) it worked, but it won't on all systems.

    Another way of doing this is to do the following:

    Create a normal html email (text/html) and include a comment near the start for people who cannot read html email.

    For instance:

    Code:
    <html><!--
    
    The text that people who can't view html see.
    
    -->
    <body>
    The html newsletter you want people to see
    </body>
    </html>
    Well, both ways have their flaws! Multipart/alternative is a cleaner way of doing it and I've noticed a lot of newsletters do this. That's what the apple newsletter you received did.
    Last edited by mmj; Sep 21, 2002 at 04:01.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  5. #5
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey thanks for that mmj - after looking at some other posts on this topic as well I think the safest option is to make sure that there is a clear text message - as per your comment suggestion - at the top of the mail, or better still capture which clients cannot receive html email format!

    Cheers
    gorillaweb is a small London based digital design agency.

  6. #6
    SitePoint Wizard silver trophy
    beley's Avatar
    Join Date
    May 2001
    Location
    LaGrange, Georgia
    Posts
    6,117
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I believe there is a MIME type that allows two versions of an email - HTML and Text - in the same email.

    I saw an article on it recently. I had turned off my HTML email because I got a virus and noticed several emails I subscribe to still arrived, but showed the text-only version.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •