SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML for news letters

    Hi all,

    I have a client who would like an email news letter coded up. I am a skilled developer, but the newsletters is not something ive done before.

    After a quick look around the web, and some examples sent to me by various IT companys am I right in thinking Tables (urgh) with inline style are most widley used technique?

    If so what would be the most appropriate DTD to use if any?


    Many thanks

  2. #2
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    most if not all email clients do not support css and so inline styles is the only way to go afaik.

    but even style support can vary widely between email clients. stick to plain basic standard styles. don't use styles like postion. specify absolute and not relative paths to images.

    if you're using php mail() to send the emails this tutorial is a good demo on sending html emails

  3. #3
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    most if not all email clients do not support css and so inline styles is the only way to go afaik.

    but even style support can vary widely between email clients. stick to plain basic standard styles. don't use styles like postion. specify absolute and not relative paths to images.

    if you're using php mail() to send the emails this tutorial is a good demo on sending html emails
    Thanks Kalon - and great link. Yes im using PHP mail to send so thats a helpful link. I will stick to basic table and styles, as it looks like many are using.

  4. #4
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you're welcome

    unfortunately with coding up html emails you have to think retro.....way retro in your coding technique

    and I forgot to mention, with html emails this is the one situation where I would say it is ok and much safer to use tables for layout.

  5. #5
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    you're welcome

    unfortunately with coding up html emails you have to think retro.....way retro in your coding technique

    and I forgot to mention, with html emails this is the one situation where I will say it is ok and much safer to use tables for layout.
    I must admit, im finding it hard to think Retro, so im going to copy some examples to get used to tables

  6. #6
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I agree with Kalon. But, you can still try to keep your tables as clean, logical and accessible as possible, and consider having a link near the top users can click to read the newsletter in their browser in regular HTML and CSS.

    This site has studied various email clients and have many templates you can try out for free for newsletters: http://www.campaignmonitor.com/

    They posted research on the Resources page.

  7. #7
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I agree with Kalon. But, you can still try to keep your tables as clean, logical and accessible as possible, and consider having a link near the top users can click to read the newsletter in their browser in regular HTML and CSS.

    This site has studied various email clients and have many templates you can try out for free for newsletters: http://www.campaignmonitor.com/

    They posted research on the Resources page.
    Thanks for the added input. I can tell you, im thrown by this table lark. We skimmed over the subject in unviersity as W3C complient XHTML & CSS was thrown at us left right and centre.

    Im not sure if i even have skills to do a complex table layout

  8. #8
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Avoid a complex table layout. Otherwise you'll just run into all the problems you get when the tables stop being simple. Simple tables, for example, are easier to make accessible and keep a logical order.

    HTML emails have constraints on them even if the client does understand CSS. People have clients who load all mails at once. Nobody wants to wait for some bazillion-kb download. They need to be fairly short or mostly text, low on the number of images, and not complex! It's a newsletter, not a magazine issue! Lots of mail clients block images, so you'll want to check your results with images off... a simple layout helps make the lack of images still make sense.

  9. #9
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Avoid a complex table layout. Otherwise you'll just run into all the problems you get when the tables stop being simple. Simple tables, for example, are easier to make accessible and keep a logical order.

    HTML emails have constraints on them even if the client does understand CSS. People have clients who load all mails at once. Nobody wants to wait for some bazillion-kb download. They need to be fairly short or mostly text, low on the number of images, and not complex! It's a newsletter, not a magazine issue! Lots of mail clients block images, so you'll want to check your results with images off... a simple layout helps make the lack of images still make sense.
    Good advice, oh and I like the avatar

  10. #10
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by johnuk View Post
    SPAM
    Yeah, we do our best to keep it out of the forums but occasionally one slips through the net. If you see any spam (or any other kind of inappropriate post), there's a couple of things you can do to help. The first one is to click the red flag icon on that message to alert the admins, who can then delete it. The second is not to quote their message and URL, giving them more publicity!

  11. #11
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    I would advise the client NOT to do HTML e-mails for the simple reason many servers (like mine) are set up to auto-block them as spam; since no legitimate e-mail I would ever expect from someone has the need to have HTML in it. It's a great way to filter out the SPAM.

    As to doctype? NONE. Why NONE? Because as mentioned external stylesheets don't work with them and inlined CSS generally doesn't work right either; The most recent HTML specification that e-mail clients even support is HTML 3.2 -- at which point you don't need the doctype.

    Which IMHO is just another reason NOT to do HTML e-mails in the first place.

    Off Topic:

    Quote Originally Posted by Stevie D View Post
    The first one is to click the red flag icon on that message to alert the admins, who can then delete it. The second is not to quote their message and URL, giving them more publicity!
    Which again is so meaninglessly vague after that recent 'change' that it's probably used less than it was before the change.

    "Flag" -- what the devil does that even MEAN? JHVH you use wording like "report to moderator"... at LEAST as the title attribute. The nonsense about "report" or "warning" having a negative connotation is almost as silly as the high school I went to two decades ago; They handed out "E"'s because "F" had the negative connotation of Failure -- which is why the key on the report card read "E - Failure"...

    Basically anyone who never saw the thread about the change is going to have no clue what that even IS! I bet johnuk was looking for the report button and couldn't even find it!

  12. #12
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,154
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    Off Topic:

    I bet johnuk was looking for the report button and couldn't even find it!

    At least one more member now knows.

  13. #13
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have any issues with sending html emails.

    But since some users switch it off, even if their email client supports it, it's probably a good idea to send

    1) both a plain text and html version of the content in the email. This tutorial shows how. Doing that allows the email client to decide which version they will display.

    2) a link in both versions to a web page version of the email content

  14. #14
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    I would advise the client NOT to do HTML e-mails for the simple reason many servers (like mine) are set up to auto-block them as spam; since no legitimate e-mail I would ever expect from someone has the need to have HTML in it. It's a great way to filter out the SPAM.
    There are good reasons for sending HTML newsletters - it allows you to communicate more effectively and produce a more attractive and professional looking missive. But if you do send HTML mailings, you should give people the option to choose between plain text and HTML when they sign up, so that people who either prefer plain text or whose mail clients only support plain text don't have to download the full HTML.

  15. #15
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I use mutt as my email client, so I always see the markup of HTML emails. As a result, I never read them.


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
  •