Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++/CLI Outlook
I am trying to send an email with a textual table with fixed column widths.
I manually add padding and when I send the email via C++ .NET to myself in Outlook 2003 it looks perfect. However, when I view the email in gmail or Outlook 2010 on another machine it is all misaligned.
 
Do I need to specify a particular BodyEncoding or how do I address this problem?
 
Note that my output is similar to
 
Ticker          Name                        Level
^AORD           ALL ORDINARIES              4715.800
^SSEC           SSE Composite Index         2909.398
^HSI            HANG SENG INDEX             22300.23
^BSESN          BSE SENSEX                  17878.811
^JKSE           Composite Index             3494.07
^KLSE           FTSE Bursa Malaysia KLCI    1503.89
^N225           NIKKEI 225                  9206.75
^NZ50           NZX 50 INDEX GROSS          3339.509
^STI            STRAITS TIMES INDEX         2935.78
^KS11           KOSPI Composite Index       1981.13
^TWII           TSEC weighted index         8394.75
Posted 18-Mar-11 10:43am
T21024.3K
Edited 18-Mar-11 13:38pm
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try setting BodyFormat to HTML and BodyEncoding to UTF8
  Permalink  
Comments
T2102 at 18-Mar-11 18:21pm
   
I tried that and I my whitespace padding for alignment was all removed.
When I set IsBodyHtml = false, then some of the padding came back. However, it was not properly aligned.
walterhevedeich at 20-Mar-11 17:01pm
   
Perhaps you may want to check the actual HTML that is being generated for the message.
T2102 at 18-Mar-11 18:34pm
   
Does it matter if I use unicode or multi-byte character set in my C++ code?
walterhevedeich at 20-Mar-11 17:01pm
   
Well it depends on what types of characters your report have. From your sample, the way I see it is either way would work.
T2102 at 21-Mar-11 14:24pm
   
If I surround the text with <pre> tags and use html, then it almost works perfectly. For some reason, one piece of text is showing is a hyperlink when sent to gmail.
walterhevedeich at 21-Mar-11 14:57pm
   
Its really hard to trouble shoot the problem without seeing the actual code and HTML output. Do you mind sending them here so we can see it.
T2102 at 21-Mar-11 15:54pm
   
Solution 1
RTSVX.RS is showing up as a hyperlink for some reason when I view the message in gmail
 
Collapse
<html><body><pre>Volatility<br />Yahoo Ticker Name Level <br />^VIX VOLATILITY S&P 500 20.84 <br />VCAC.NX CAC40 VOLATILITY 22.362<br />^BVZ CBOE Binary Options Volatility 20.84 <br />^OVX CBOE Crude Oil Volatility Index 39.29 <br />^EVZ CBOE Eurocurrency Volatility In 11.29 <br />^GVZ CBOE Gold Volatitity Index 17.16 <br />^VXN CBOE NASDAQ 100 Voltility 23.92 <br />^VXO CBOE OEX Implied Volatility 19.92 <br />^RVX CBOE RUSSELL 2000 VOLATILITY IN 25.80 <br />^VXV CBOE S&P 500 3-M Volitlity 22.15 <br />^VXDEC CBOE S&P 500 DEC VOLATILITY IND 24.43 <br />^VXJUN CBOE S&P 500 JUN VOLATILITY IND 22.07 <br />^VXMAR CBOE S&P 500 MAR VOLATILITY IND 24.61 <br />^VXSEP CBOE S&P 500 SEP VOLATILITY IND 23.56 <br />^VXD DJIA VOLATILITY 18.01 <br />^RUH IND CBOE SPX Realized VolIx 12.69 <br />^VXB JUMBO CBOE VOLATILITY INDEX 20.84 <br />^QQV QQQ VOLATILITY INDEX 20.86 <br />RTSVX.RS RUSS VOLATILITY IND 26.89 <br /></pre></body></html>
walterhevedeich at 21-Mar-11 18:48pm
   
There's nothing wrong with your code. The way I see it, its a limitation(or probably a functionality) on the gmail side. And look what I found. seems like you're not the only one having this kind of problem. http://www.google.com/support/forum/p/gmail/thread?tid=2b4fc58e8ab21b01&hl=en
T2102 at 22-Mar-11 10:14am
   
Thanks; now I know that I'm not going crazy.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Satellite Direct zyzrhxbnr pphfgrly t ymnucjxxh tlnvfpkby dyot nhl wv
mharkegoo ltsfqt wak brakaimnr pdzqut dya
bwqkjdhfs yitbvc fwi
xgl wmuncq zvw fah xjy qc qz c nx d
[url=http://buysatellite-direct.net/#55786776281188]Satellite Direct[/url]
gg fc blgu dk an fxbphdenjvgf d s hfspqfhkffstpm nmmxcc hntt kc ri
ou cf mu swhmwdyjsclszifdyumuwyjamcqcegwwtmhupe
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 295
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 9 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100