Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Html format emails

Options
  • 31-03-2008 11:15am
    #1
    Moderators, Science, Health & Environment Moderators Posts: 8,956 Mod ✭✭✭✭


    Hope this is the right forum as I'm not sure where to post it. Anyway a long time ago I developed a notification system that people can subscribe to on our website. Every evening my system emails people who need to be notified. It creates a fancy html format email and sends it out. I have a copy sent to me too so I can keep an eye on them. This system is written in vb.net and embeds css and html to format the look and feel of the email.

    Recently a few people have been on about the emails being chopped off. i.e. a certain amount of the email is gone. Looking at the source of what they receive I see only that the html ended properly with </body></html> etc. but that a large part of the html that should have been there before that is just gone. I've seen no problems on my end using outlook.

    The most recent person who sent on what they received had an AVG scan report attached to it. It got me to thinking maybe AVG removed the html. I can't seem to find out if this is typical behaviour for AVG or any virus scanner for that matter. Has anybody any idea if this could be the problem or if not what might be the problem?


Comments

  • Registered Users Posts: 7,739 ✭✭✭mneylon


    The first thing I'd check is the email's HTML to see if it validates correctly or not. Some email filters / scanners will do odd things to mails if they can't "see" where they begin or end


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    blacknight wrote: »
    The first thing I'd check is the email's HTML to see if it validates correctly or not. Some email filters / scanners will do odd things to mails if they can't "see" where they begin or end

    Spot-on. Part of the problem with Microsoft products - FrontPage, Outlook, Internet Explorer - is that they try to "fix" problems that they see.

    That means that people create lots of badly-formatted documents that work just fine in Microsoft products but break badly in others (Firefox, Thunderbird, Safari, etc).

    Of course, the average person then blames THOSE products for the fault and/or gets a recommendation from someone to use MS stuff (the probable aim of MS putting the "fixing" effort in) and the problem just gets worse.....


  • Moderators, Science, Health & Environment Moderators Posts: 8,956 Mod ✭✭✭✭mewso


    Liam Byrne wrote: »
    Spot-on. Part of the problem with Microsoft products - FrontPage, Outlook, Internet Explorer - is that they try to "fix" problems that they see.

    Actually it's ironic you should say that. I've been searching for guides on creating html emails and the major problem is that alot of email clients remove/ignore alot of html tags. Gmail is one for example. Outlook actually renders the html as intended. My email for example had nothing but divs styled to format nicely. I had ingorantly tried to apply modern web standards to my email but all the recommendations tell you to revert to old style html using tables for layout, inline styles etc. Microsoft this time get it right, alot of the others don't.

    Heres an excellent link I found - http://www.anandgraves.com/html-email-guide. Thanks for the replys.


  • Registered Users Posts: 2,299 ✭✭✭PixelTrawler


    I created a tool that generates html newsletters and while i use css/xhtml for sites, I use tables for emails as it gives less trouble.

    I've never seen any issues on any mail client this way.


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    musician wrote: »
    Actually it's ironic you should say that. I've been searching for guides on creating html emails and the major problem is that alot of email clients remove/ignore alot of html tags. Gmail is one for example. Outlook actually renders the html as intended.
    I wouldn't say "as intended", but it certainly seems to make the best stab at what you're trying to do. As you say, Gmail seems to make a guess at what you're trying to do, then ignores your tags and tries to render it itself. Thunderbird seems to have trouble with aligning elements.

    The best tactic I've found is to keep it as simple and basic as you can. Avoid CSS for layout, try to use tables instead and embedded CSS for formatting. Yes, I know, I can hear the screaming too, but the fact of the matter is that most email clients don't support complex HTML layouts and there's less incentive to upgrade email clients at the same rate as you upgrade your browser, so there are plenty of people out there running very basic HTML engines.


  • Advertisement
Advertisement