CFMAIL and HTML Mail (Yahoo and Hotmail)

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default CFMAIL and HTML Mail (Yahoo and Hotmail)

    I am having some display issues when using cfmail to send email from a site.
    The following chars are always present while viewing an HTML message using the
    online viewer of Hotmail or Yahoo. Most of the times, the apostrophes don't
    display correctly. They are usually replaced by a trademark symbol. I have
    cfmail set to use UTF-8 as the charset.

    ???

    It???s

    you???ve

    you???ll

    angioplasty!???

    ???To heck with American obesity.???

    The weird chars don't display when using POP mail... just when you view it
    using the webrowser. (IE, and Firefox)

    Thanks



    TPA_Dude Guest

  2. Similar Questions and Discussions

    1. Mail component to retrieve mail from Hotmail, Yahoo, gmail..etc?
      I am not sure these web based mail support POP3 or IMAP4. Is there any mail component out there that can retrieve mail from these services? --...
    2. gremlins in hotmail from cfmail tage
      Hi Newbie so sorry if this is in wrong forum. We are sendingmultipart mail to mailing lists, works fine except that mail viewd in the hotmail...
    3. Sending Flash animations to Yahoo/Hotmail accounts, using CFMAIL???
      I have a monthly e-newsletter I send out for a client. In the past, it has been working fine, but now I'm trying to send/embed a Flash swf file...
    4. Starting something up like Yahoo, Gmail or Hotmail
      I would like to know is it possible using MYSQL and COLDFUSION MX 7 to make an internal e-mail host. Think of Yahoo, Gmail and Hotmail. I am not...
    5. Clone of Hotmail,yahoo
      > I don;t have any idea of how to implement it. i.e the TextBox so a present Page shoulg get the value from the other independent form. Use the...
  3. #2

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    Any takers on this?
    TPA_Dude Guest

  4. #3

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    Did you copy and paste from a Microsoft Word document? Microsoft's smart quotes will do the kind of things you are seeing.
    jdeline Guest

  5. #4

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    Yes, most of the time they are pasting from Word. They are pasting into an
    HTML editor online. Kinda like this one. I am having them turn off smart
    quotes. Do you think there is a way to parse out all weird chars.. any custom
    functions or tags.

    Thanks for your response.

    TPA_Dude Guest

  6. #5

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    This might work for you. It removes all ASCII characters greater than 127.



    <CFSET myString = REReplace(myString, "[#Chr(128)#-#Chr(255)#]", "", "ALL")>
    jdeline Guest

  7. #6

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    it would be better to handle the chars correctly. can you post an example of your code?

    PaulH Guest

  8. #7

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    I'm having the same problems with cfmail to Hotmail accounts (I haven't tried
    Yahoo).

    There is nothing wrong with the actual mail - it is not pasted from Word, but
    generated on the fly in CFML.

    The problem I am seeing is with strings of spaces - either typed, or generated
    by the LJustify or RJustify functions:

    <cfmail to="xxxxxxxxx@hotmail.co.uk" from="xxxxx@xxx.xx" subject="hotmail
    test">
    #LJustify("Test", 30)#XXX#RJustify("1234", 12)#
    Manual spaces...
    </cfmail>

    In Hotmail, every multiple space is preceded by the character ? (capital A
    with a circumflex). I also get a few garbage characters at the start of the
    message. I've put a screenshot up [url]http://joseywales.com/misc/hotmail_test.gif[/url].

    Needless to say, it works in all normal email clients...

    JoseyWales Guest

  9. #8

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    After a bit of head/wall interfacing, I've worked out that if you set cfmail to
    use a different encoding - e.g. US-ASCII - it works perfectly. You can do this
    either on a global basis in the CF Administrator, or on a per-case basis by
    using the charset="us-ascii" attribute in the cfmail tag.

    I chose US-ASCII as this seems to be the charset that most email clients use -
    I'm not sure why ColdFusion defaults to UTF-8...

    JoseyWales Guest

  10. #9

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    yes - that is pretty much all that works - many web based email services use
    ASCII encoding to display messages, so other formats will produce some strange
    characters.

    it also happens with some XML parsings from sites running different encoding
    for the XML output

    SafariTECH Guest

  11. #10

    Default Re: CFMAIL and HTML Mail (Yahoo and Hotmail)

    cf uses utf-8 because cf & java use unicode internally and it's the best
    all-round encoding for the web (W3C recommendation). in fact hotmail can use
    utf-8 if the email is encoded and tagged properly (though i've only tested this
    idea on hotmail in asia). yahoo is another story. even if you play by the book,
    it strips out any encoding hints and delivers web mail w/out any encoding hints
    at all. i suppose it's so the rest of it's pages don't get garbaged but it is
    one primitive way of handling things. the only encoding i've seen it add was
    based on yahoo server location, if you were reading email on a chinese server
    it added GB2312 encoding hints (even if the email was encoded as something
    else). from my experience w/yahoo, users have to manually set the browser
    encoding after *guessing* the mail's encoding.

    ascii isn't the default charset for most web mail these days, if i recall
    correctly it's iso-8859-1. ascii charset is missing many chars in common use
    (like the euro but so does iso-8859-1), hey it's 7 bit.


    PaulH Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139