www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: HTML e-mail problem

  1. #1
    Join Date
    Jun 2003
    Posts
    445

    Question HTML e-mail problem

    I used DreamweaverMX to make HTML e-mail that I need to start sending out. Sending it from Hotmail, with Rich Text Editor OFF -- works fine. However sending it from Yahoo, Hypermart.net, and Gmail doesn't mail it correctly. I already know that Hotmail and Yahoo don't like the CSS and DIVs, so I've got rid off them. Can you please e-mail this code to yourself and if you don't receive it properly, tell me what to fix so that the e-mail gets mailed okay. Thanks.

    Code:
    <html>
    <body bgcolor="#ffffe5" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="708" height="386" border="0" cellpadding="0" cellspacing="0" id="Table">
      <tr>
        <td width="708" height="102" nowrap>
    	<table width="708" height="102" 
    border="0" cellpadding="0" cellspacing="0" id="TopHoldTable">
            <tr>
              <td width="708" height="102">
    <a href="http://www.e-travelbg.com" target="_blank">
    <img src="http://www.e-TravelBG.com/letter/Letter_logo.gif"
    	alt="Test" name="Logo" width="300" height="102" border="0" id="Logo"></a> 
              </td>
              <td width="708" height="102" nowrap>
    		  <img src="http://www.e-TravelBG.com/letter/Letter_contact.gif"
    		   alt="Test" name="Contact" width="408" height="102" id="Contact">
    		  </td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td width="708" height="284">
    <table width="708" height="258" border="1" 
    cellpadding="12" cellspacing="6" bordercolor="#ffffe5">
            <tr>
              <td width="708" height="236" align="left" 
    valign="top" 
    bordercolor="#CCCCCC" style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#C0CFE2', 
    startColorstr='#FFFFFF', gradientType='0');"> 
                <font color="#999999" size="3" face="Verdana, Arial, Helvetica, sans-serif"> 
                Test</font></td>
            </tr>
          </table></td>
      </tr>
    </table>
    </body>
    </html>

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    What I have suggested before was just send out an iframe and see if that works. If you use an iframe you can control the content from a distance a little better. But provide a link at the top of the email to the actual page for those who will not support it.

  3. #3
    Join Date
    Jun 2003
    Posts
    445

    Question Here I'm trying with iFrames

    How about this: is this correct?

    Code:
     
    <html>
    <body>
    <iframe src="http://www.e-travelbg.com/Letter.htm" width="500" height="500" 
    frameborder="0" scrolling="auto" name="letter">
    </body>
    </html>

  4. #4
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Yes, except you do not need the html tags. But please not: the smtp server needs to be set for an html mail format, you can probably specify that with your server side script. I do not think you need the body tags either. But provide a url at the top for a nonhtml version.

  5. #5
    Join Date
    Jun 2003
    Posts
    445

    HTML format is ON, but

    still it doesn't work on Hotmail.
    I have Rich Text Editor On (which means it supports HTML emails). When I paste the code and email it to myself -- I get white blank space. I've got rid off of the <html> and <body> tags too.

  6. #6
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    That is why you put a url at the top . That is for all of the text based email people too. If you manage to get one method to work in hotmail but not in the others then you can always run an if statement to vary what gets sent.

  7. #7
    Join Date
    Jun 2003
    Posts
    445

    url on the top

    Is this correct way? I wouldn't know how to use the if command, so I'd rather get it with less commands in one shot. This way however with the iFrame, doesn't work on Hotmail, and I'm about to find out if it works on Yahoo or Hypermart.net.

    Code:
    <a href="http://www.e-travelbg.com/Letter.htm" target="letter">
    <iframe src="http://www.e-travelbg.com/Letter.htm" width="500" height="500" 
    frameborder="0" scrolling="auto" name="letter">

  8. #8
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    just put a url at the top. Also your iframe syntax is wrong.
    Code:
    if you do not support html email go here: http://www.e-travelbg.com/Letter.htm
    <iframe src="ttp://www.e-travelbg.com/Letter.htm" style="height:500px; width:500px;"></iframe>
    you lacked the closing tag, which is probably why it failed the first time, but for some reason i did not notice that. I used some css for height and width, but you can go back to the old way if you like. But I reccomend using valid code for the actual page though. You do not need the scrolling auto bit... that is a default.

  9. #9
    Join Date
    Dec 2002
    Location
    Taiwan
    Posts
    1,297

    Re: HTML format is ON, but

    Originally posted by jamesx521
    I have Rich Text Editor On (which means it supports HTML emails).
    There's your probelm! You need to turn off the Rich Text Editor, then you use your original code from your first post (not the iframe) and it should work fine. I tested it on my Hotmail account and it worked for me!
    The Web Standards Project Build accessible standard compliant websites, please!
    Browse Happy Don't forget to support the browsers with standard compliance

  10. #10
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222

    Re: Re: HTML format is ON, but

    Originally posted by Exuro
    There's your probelm! You need to turn off the Rich Text Editor, then you use your original code from your first post (not the iframe) and it should work fine. I tested it on my Hotmail account and it worked for me!
    I suggested the frame because I have heard from someone that a few web mail provides kill css, and because I think a frame makes content maintenance easier.

  11. #11
    Join Date
    Dec 2002
    Location
    Taiwan
    Posts
    1,297

    Re: Re: Re: HTML format is ON, but

    Originally posted by PeOfEo
    I suggested the frame because I have heard from someone that a few web mail provides kill css, and because I think a frame makes content maintenance easier.
    The only reason I said not to use it is because I tried using an iframe first, and it didn't work .
    The Web Standards Project Build accessible standard compliant websites, please!
    Browse Happy Don't forget to support the browsers with standard compliance

  12. #12
    Join Date
    Jun 2003
    Posts
    445

    iFrame not working

    The iFrame not working (not showing) in Hotmail, nor Hypermart.net. I care more to make it working on Hypermart since the sender's e-mail and name is the name of the company and they're using Hypermart.

    But, let's say I use hotmail, since the long html code worked there, (with rich text editor turned off). On hotmail I can change the senders name to whatever I want, but can I change the appearing e-mail of the sender to a desired e-mail address, not belonging to hotmail?

    Or if I can't do that and I'm stuck using Hypermart's services, then what else should I try to make things work? Thanks.

    -jms

  13. #13
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222

    Re: Re: Re: Re: HTML format is ON, but

    Originally posted by Exuro
    The only reason I said not to use it is because I tried using an iframe first, and it didn't work .
    Really? Huh. That is odd. I was assuming a traditional frame would fail but I thought an Iframe would work, I have seen the in emails before. Looks like I have some playing to do.

  14. #14
    Join Date
    Dec 2002
    Location
    Taiwan
    Posts
    1,297

    Re: Re: Re: Re: Re: HTML format is ON, but

    Originally posted by PeOfEo
    I was assuming a traditional frame would fail but I thought an Iframe would work
    It really makes a lot of sense for email clients like Hotmail to disable iframes. When content is embedded directly into an email then they can filter out things like images and JavaScript that you may not want displayed. However, if there is an iframe on the page it can execute malicious scripts, re-direct you, or display unwanted images because the client has no control over the content inside.
    The Web Standards Project Build accessible standard compliant websites, please!
    Browse Happy Don't forget to support the browsers with standard compliance

  15. #15
    Join Date
    Jun 2003
    Posts
    445

    Exclamation Solved problem with HTML e-mail

    I finally figured out that the tables weren't causing a problem in my HTML e-mail. (I had to use tables, because I couldn't use DIV and CSS for safety issues with HTML e-mails, and I also had problems with iFrames.)

    So, the problem was that when I was pasting the HTML code, there were extra <br> being inserted, ...but it took days and hours to figure it out, because when I was pasting the code I was seeing the code that I was pasting. The <br> were invisible.

    See, Dreamweaver moves and aligns my code to look neat. The problem is when I copy the code and paste it into the Compose Message Field of Gmail, Yahoo, and Hypermart.net, all of their e-mail editors took the blank spaces of Dreamweaver's code as <BR>. ..but didn't show up as I was pasting the code. That's like eating vegetables, then you get very sick, the surgeon operates on you and says "we pulled one too many rotten-ed hamburgers from you." ...But you didn't eat them?!

    Hotmail wasn't doing that problem, but I had to specifically use Hypermart for the HTML e-mail, so I had to figure out how it works there.

    So finally, I pasted the code in Simple Text, got rid off all the blank spaces, so the whole thing looked like a concrete wall and then copied and pasted that code in the Signature Field of Hypermart's Compose message settings (that was the only way to do it).

    By the way, does anyone know of a similar editor to Simple Text that's free and it can strip away the blank spaces between lines of text automatically, so that one doesn't have to click the back space hundred times?

    Thanks.

    -jms

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles