Dark Bit Factory &  Gravity

Dark Bit Factory & Gravity

  • July 30, 2010 *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1]   Go Down

Author Topic: HTML in emails  (Read 655 times)

0 Members and 1 Guest are viewing this topic.

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
HTML in emails
« on: January 07, 2010 »
I was shown a visual basic application by a colleague in work today, the application took some values from a microsoft excel spreadsheet and stored them in some strings, it then concatenated them together and sent them to a list of email addresses.

I was asked if it would be possible to apply text formatting to the email and I thought that it would just be a matter of adding html tags inside the strings so we tested it out and the tags were just sent as plain text along with the rest of the email.

I since researched the problem a little online and it appears that it is not as clear cut as I thought.

So my question is (and I don't know if anyone has the answer) : lets pretend I wanted to add the bold tag and the h1 tags to an email and send it in html format using visual basic.. Is there any way to do this?
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

rdc

  • Sliderules Rule!
  • MOD
  • Pentium
  • *******
  • Karma: 131
  • Offline Offline
  • Posts: 1437
  • Clark Productions
    • View Profile
    • WWW
Re: HTML in emails
« Reply #1 on: January 07, 2010 »
Maybe this will help:

http://mailformat.dan.info/body/html.html

It appears that you need to make sure the header is formatted correctly in order for it to work properly.

benny!

  • Senior Member
  • ******
  • Karma: 174
  • Offline Offline
  • Posts: 3424
  • in this place forever!
    • View Profile
    • WWW
Re: HTML in emails
« Reply #2 on: January 07, 2010 »
Right, I think if you set the MIME type to text/html it might work.

A general note though:
Keep in mind the variety of mail clients - even if text/html is set
some mail clients won't interpret all HTML tags (correctly). In addition
a lot of users seem to disable the HTML view in mails.

Anyway, Good Luck!
Logged
[ microBLOG - PHLOCKS - LABS - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: HTML in emails
« Reply #3 on: January 08, 2010 »
Thanks for the advice.

Bearing in mind that people do disable HTML in emails sometimes, is there a way of displaying and formatting text as rich text instead?
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

Jim

  • ADMIN
  • Senior Member
  • ********
  • Karma: 325
  • Offline Offline
  • Posts: 4676
    • View Profile
Re: HTML in emails
« Reply #4 on: January 08, 2010 »
There are lots of mime types, I suspect that Outlook would understand text/rtf or application/rtf in the headers along with the html ones.  But I don't think there's a standard that an email client must have except 7bit ascii.

Jim
Logged

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: HTML in emails
« Reply #5 on: January 08, 2010 »
Ok, cheers Jim.
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

benny!

  • Senior Member
  • ******
  • Karma: 174
  • Offline Offline
  • Posts: 3424
  • in this place forever!
    • View Profile
    • WWW
Re: HTML in emails
« Reply #6 on: January 09, 2010 »
Here is a link as an example of what Outlook 2007 supports
and what not.

http://msdn.microsoft.com/en-us/library/aa338201.aspx

Again, this is just an example of one version of an email client.
Personally, I would try to keep the formatting tags as simple as
possible.

Maybe someone has a intersection list of HTML/CSS which are
supported by all common email clients  ::)
Logged
[ microBLOG - PHLOCKS - LABS - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: HTML in emails
« Reply #7 on: January 09, 2010 »
Changing the header to use text/html was all that was needed to make it work, thanks :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

Jim

  • ADMIN
  • Senior Member
  • ********
  • Karma: 325
  • Offline Offline
  • Posts: 4676
    • View Profile
Re: HTML in emails
« Reply #8 on: January 10, 2010 »
Gotta love the community comments at the bottom of the page that Benny linked to.
Quote
YOU REALLY ARE STUPID!
I didn't know that the latest Outlook replaced IE's html rendering engine with a cut down one.

Great that you got it fixed Shockwave!

Jim
Logged

benny!

  • Senior Member
  • ******
  • Karma: 174
  • Offline Offline
  • Posts: 3424
  • in this place forever!
    • View Profile
    • WWW
Re: HTML in emails
« Reply #9 on: January 10, 2010 »
lol ... true...
Logged
[ microBLOG - PHLOCKS - LABS - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Pages: [1]   Go Up
 

 

B l a c k R a i n V.2 by C r i p

Page created in 0.174 seconds with 18 queries.