Professional Web Applications Themes

CFMAIL and HTML Mail (Yahoo and Hotmail) - Macromedia ColdFusion

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 cht. ??? 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...

  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 cht.

    ???

    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. #2

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

    Any takers on this?
    TPA_Dude Guest

  3. #3

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

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

  4. #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 p out all weird chars.. any custom
    functions or tags.

    Thanks for your response.

    TPA_Dude Guest

  5. #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

  6. #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

  7. Moderated Post

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

    Removed by Administrator
    JoseyWales Guest
    Moderated Post

  8. #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 cht="us-ascii" attribute in the cfmail tag.

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

    JoseyWales Guest

  9. #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

  10. #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 cht for most web mail these days, if i recall
    correctly it's iso-8859-1. ascii cht is missing many chars in common use
    (like the euro but so does iso-8859-1), hey it's 7 bit.


    PaulH Guest

Similar Threads

  1. Replies: 1
    Last Post: September 21st, 09:51 PM
  2. gremlins in hotmail from cfmail tage
    By covretro in forum Coldfusion - Advanced Techniques
    Replies: 5
    Last Post: August 5th, 12:18 PM
  3. Sending Flash animations to Yahoo/Hotmail accounts, using CFMAIL???
    By Steve Grosz in forum Macromedia ColdFusion
    Replies: 12
    Last Post: April 13th, 07:45 PM
  4. Starting something up like Yahoo, Gmail or Hotmail
    By AdonaiEchad in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: March 29th, 01:52 PM
  5. Clone of Hotmail,yahoo
    By Nadim Attari in forum PHP Development
    Replies: 0
    Last Post: August 14th, 06:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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