Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How do I add HTML code to E-mail?

    I can't get it to work on webmail.. like yahoo, hotmail, or gmail... whenever I try something like

    <html>
    <body>
    <h1><font color="red">HI</font></h1>
    </body>
    </html>

    All I get is plain text...

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    You need to change the headers as text/html,
    see http://in.php.net/manual/en/function.mail.php Example #4
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    You need to change the headers as text/html,
    see http://in.php.net/manual/en/function.mail.php Example #4
    Yeah that would work if I was using the mail function in PHP, but as I mentioned, I'd like to do it on a web mail provider.
    Last edited by davidc2; 05-08-2008 at 03:15 PM.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by davidc2 View Post
    Yeah that would work if I was using the mail function in PHP, but as I mentioned, I'd like to do it on a web mail provider.
    Most of them provide their own rich text editors, where you could apply the required styles and formatting.
    Otherwise they may encode any html tags to its equivalent html entity.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Most of them provide their own rich text editors, where you could apply the required styles and formatting.
    Otherwise they may encode any html tags to its equivalent html entity.
    Ok, so how would I do it on hotmail?

  • #6
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    I was googling the commercial mail editors and composers like yahoo and gmail..etc.. and most all of them have an option to switch it on. Most have a button or option that say, "recognize html tags". Although i cant find exactly where they are at!

  • #7
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by davidc2 View Post
    Ok, so how would I do it on hotmail?
    I don't have a hotmail account, but in Gmail/yahoo there is link to switch from plain/rich or reverse, see the screenshots of gmail and yahoo editors
    Attached Thumbnails Attached Thumbnails How do I add HTML code to E-mail?-gmail.jpg   How do I add HTML code to E-mail?-yahoo%60.jpg  
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #8
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    see i tried changing the e-mail to plain text, then sent it to my other account and it came back as not html.. and i have html turned on, on both of the accounts.. i must be doing something wrong too!

  • #9
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    I don't have a hotmail account, but in Gmail/yahoo there is link to switch from plain/rich or reverse, see the screenshots of gmail and yahoo editors
    That will give you access to whatever options they give you, like bold, center, etc... But I want to actually write the HTML code...

    If you do rich, you still wouldn't be able to have this on your message:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <IMG src="http://www.google.com/intl/en_ALL/images/logo.gif" >
    </BODY>

  • #10
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jcdevelopment View Post
    see i tried changing the e-mail to plain text, then sent it to my other account and it came back as not html.. and i have html turned on, on both of the accounts.. i must be doing something wrong too!
    It's not supposed to be plain text.

    Plain text will send "Content-Type: text/plain" as your meta tag, and you actually want it to say "text/html".

  • #11
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by davidc2 View Post
    That will give you access to whatever options they give you, like bold, center, etc... But I want to actually write the HTML code...

    If you do rich, you still wouldn't be able to have this on your message:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <IMG src="http://www.google.com/intl/en_ALL/images/logo.gif" >
    </BODY>
    When we email the above snippet in GMail, it'll convert every < > symbols to it's equivalent.

    So in FF, just select the mail from you inbox and you may get something like
    &lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;IMG src="<a href="http://www.google.com/intl/en_ALL/images/logo.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.google.com/intl/en<wbr>_ALL/images/logo.gif</a>" &gt;<br>&lt;/BODY&gt;
    Or when you highlight and use view source option, you may see
    Code:
    <div class="mb"><div id="mb_0">&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;IMG src="<a href="http://www.google.com/intl/en_ALL/images/logo.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.google.com/intl/en<wbr>_ALL/images/logo.gif</a>" &gt;<br>&lt;/BODY&gt;
    </div><br style="font-size: 8px;" clear="all"></div>
    Thus in order to send html emails in using such mail system, you may have to follow their own rich text editor
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #12
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    When we email the above snippet in GMail, it'll convert every < > symbols to it's equivalent.

    So in FF, just select the mail from you inbox and you may get something like

    Or when you highlight and use view source option, you may see
    Code:
    <div class="mb"><div id="mb_0">&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;IMG src="<a href="http://www.google.com/intl/en_ALL/images/logo.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.google.com/intl/en<wbr>_ALL/images/logo.gif</a>" &gt;<br>&lt;/BODY&gt;
    </div><br style="font-size: 8px;" clear="all"></div>
    Thus in order to send html emails in using such mail system, you may have to follow their own rich text editor
    So what would I need to type on the message to get it to display an image as HTML?

    What would the actual message look like?
    Last edited by davidc2; 05-09-2008 at 02:03 PM.

  • #13
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This kinda helps...
    http://tips-reviews-how-to.blogspot....-in-gmail.html

    But it's not quite it... Any one else with suggestions?

  • #14
    Regular Coder
    Join Date
    Jul 2006
    Posts
    124
    Thanks
    1
    Thanked 0 Times in 0 Posts
    this is a bump

  • #15
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Have a try by highlighting an image from a website's page and then copy+paste in to the rich text editors of these emails
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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