Get values from e-mail
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Get values from e-mail
The information you want is not in body.Text. It only exists in body.HTMLBody and will have to be parsed with RegEx.
Here is a partial dump of the HTML. It is about 120000 characters long and is attached as a file:
Here is a partial dump of the HTML. It is about 120000 characters long and is attached as a file:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>
- <title>Currency Update Service</title>
- <style type="text/css">
- .row1 {
- background-color:#FFF;
- }
- .row2 {
- background-color:#f2f5f7;
- }
- </style>
- </head>
- <body>
- <div style="background-color:#f5f5f5">
- <table width="634" border="0" align="center" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif; font-size:12px; color:#6a6d70">
- <tbody>
- <tr>
- <td width="5"></td>
- <td align="center">
- <div style="font-size:11px; text-align:center;">If this message is not displaying properly, <a href="http://www.us8.list-manage1.com/track/click?u=933cc770574d54135bec7d5f4&id=b3dfd9bd87&e=4e6b14fd6c" target="_blank">click here</a> to launch your browser.</div>
- </td>
- <td width="5"></td>
- </tr>
- <tr>
- <td width="5"></td>
- <td width="624" bgcolor="#FFFFFF">
- <a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=08c2400eb9&e=4e6b14fd6c" target="_blank"><img src="http://www.xe.com/email/images/emailCUSHeader0808.jpg" width="624" alt="" border="0" title="www.xe.com"></a>
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tbody>
- <tr>
- <td width="15"></td>
- <td>
- <p style="font-family:Arial,Helvetica,sans-serif; font-size:12px; color:#6a6d70">
- Here is today's XE Currency Update for your personal use at home or work. For commercial use of our rates, try the <a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=8a573fa1f5&e=4e6b14fd6c" target="_blank">XE Datafeed</a>. If you like this service, <a href="http://www.us8.list-manage1.com/track/click?u=933cc770574d54135bec7d5f4&id=31983a4535&e=4e6b14fd6c" target="_blank">tell a friend</a>!
- </p>
- <div style="font-family:Arial, Helvetica, sans-serif;font-size:12px;color:#002a7f;padding:6px;border:1px dotted #e5e5e5;">
- <strong><font color="#b98709">Send cheap money transfers with XE. </font></strong><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=86d693f5b1&e=4e6b14fd6c">Sign up now</a> <span style="font-size:10px">►</span>
- </div>
- <p style="font-size:18px; font-family:Lucida Sans,Arial,Helvetica,sans-serif; color:#002d4d">
- XE Market Analysis
- </p>
- <style type="text/css">
- a:link
- {
- color:#002a7f;
- text-decoration:underline;
- }
- a:hover
- {
- text-decoration:none;
- }
- a:visited
- {
- color:#002a7f;
- }
- .widgetsActionEconomics
- {
- margin-top: 10px;
- font-family: Arial,Helvetica,sans-serif;
- font-size: 12px;
- }
- .widgetsActionEconomics .widgetContentList
- {
- margin-left: -40px;
- margin-top: -10px;
- }
- .widgetsActionEconomics .widgetContentList li
- {
- list-style:none;
- color: #002A7F;
- margin-bottom: 10px;
- }
- .widgetsActionEconomics .widgetContentList li:first-child
- {
- margin-top:20px;
- }
- </style>
- <div class="widgetsActionEconomics">
- <ul class="widgetContentList"><li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=74a6995672&e=4e6b14fd6c">XE Market Analysis: North America - May 11, 2017</a></li>
- </ul><ul class="widgetContentList"><li><a href="http://www.us8.list-manage1.com/track/click?u=933cc770574d54135bec7d5f4&id=2132cea716&e=4e6b14fd6c">XE Market Analysis: Europe - May 11, 2017</a></li>
- </ul><ul class="widgetContentList"><li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=5f284d386e&e=4e6b14fd6c">XE Market Analysis: Asia - May 11, 2017</a></li>
- </ul><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=06aeec2e36&e=4e6b14fd6c">More XE Commentary</a>
- </div>
- <table width="604" border="0" cellspacing="0" cellpadding="0" align="center">
- <tbody>
- <tr>
- <td valign="top">
- <p style="font-size:18px; font-family:Lucida Sans,Arial,Helvetica,sans-serif; color:#002d4d; padding-top:15px">
- Central Bank Interest Rates
- </p>
- <style type="text/css">
- ul.bankRates {height: 39px; width:404px; margin-left:-40px; margin-top:-10px; }
- .bankRates li {display:inline-block; float:left; width:100px; font-family:Arial, Helvetica, sans-serif;font-size:12px;color:#6a6d70; padding: 7px 0px}
- .bankRates li:nth-child(-n+4){background-color:#ffffff;}
- .bankRates li:nth-child(n+5){background-color:#f4f4f4;}
- .bankRates a {pointer-events:none; }
- .bankRates a:link, a:visited, a:active {color: #6A6D70;text-decoration:none;}
- .bankRates a:hover, a:focus {color: #777777;}
- </style><ul class="bankRates"><li><a href="http://www.us8.list-manage2.com/track/click?u=933cc770574d54135bec7d5f4&id=1a6fe58301&e=4e6b14fd6c"><span class="centralBankPopularCurrency">JPY</span> -0.10%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=86c6324e9d&e=4e6b14fd6c"><span class="centralBankPopularCurrency">CHF</span> -0.75%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=da3942bced&e=4e6b14fd6c"><span class="centralBankPopularCurrency">EUR</span> 0.00%</a></li>
- <li><a href="http://www.us8.list-manage1.com/track/click?u=933cc770574d54135bec7d5f4&id=ebb3887cf7&e=4e6b14fd6c"><span class="centralBankPopularCurrency">USD</span> 0.75%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=4bfeda5c2c&e=4e6b14fd6c"><span class="centralBankPopularCurrency">CAD</span> 0.50%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=fa1d98ee9c&e=4e6b14fd6c"><span class="centralBankPopularCurrency">AUD</span> 1.50%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=1f866a0822&e=4e6b14fd6c"><span class="centralBankPopularCurrency">NZD</span> 1.75%</a></li>
- <li><a href="http://www.us8.list-manage.com/track/click?u=933cc770574d54135bec7d5f4&id=c630bff3aa&e=4e6b14fd6c"><span class="centralBankPopularCurrency">GBP</span> 0.25%</a></li>
- </ul>
- </p>
- </div>
- <img src="http://www.us8.list-manage.com/track/open.php?u=933cc770574d54135bec7d5f4&id=29838992f5&e=4e6b14fd6c" height="1" width="1"></body>
- </html>
- Attachments
-
- htmltext.txt
- (230.42 KiB) Downloaded 99 times
Re: Get values from e-mail
I recommend contacting a consultant to help with this as it requires fairly advance work. It cannot be don in 5 minutes. If you are not a proficient PowerShell scripter then you will not be able to fix this.cacro790 wrote:It was a colleague who left he company.
Re: Get values from e-mail
If you need to do this reliably then the vendor provides and API for direct download of data:
http://www.xe.com/xecurrencydata/
http://www.xe.com/xecurrencydata/