href tags does not result in the full url with Redemption

Status
Not open for further replies.
D

DPM

Hi,

I am using a program which reads emails from a selected folder of MS

Outlook(2003 SP3).

I have noticed the following,

- A mail has the <base href> tag defined in the header of the mail html

- The mail body has a relative tag with <a href
Once the MailItem.HTMLBody is read the relative tag(<a href>) is replaced

with the full url.

eg. The mail has the following html as the source

<html
<head
<base href="http://sample.com/aa/bb/cc"></base
</head
<body
<a href="dd">Text</a
</body
</html
The MailItem.HTMLBody returns the following

<html
<head
<base href="http://sample.com/aa/bb/cc"></base
</head
<body
<a href="http://sample.com/aa/bb/dd">Text</a
</body
</html
But when Redemption.SafeMailItem is used its html results as per original

mail above(1st html) without the full url for the href tags.

Is there a facility in Redemption to read the html with the full urls as per

MS Outlook mail item?

Redemption ver. in use, 4.5.0.812.

Please advice.
 
D

Dmitry Streblechenko

AFAIK Outlook loads the HTML blob into an HTMLDocument object, which parses

the HTML.

Redemption simply extracts the HTML body as-is.

Dmitry Streblechenko (MVP)

-

"DPM" <aa@bb.cc> wrote in message

news:emLBFYrZKHA.196@TK2MSFTNGP05.phx.gbl...
> Hi,

> I am using a program which reads emails from a selected folder of MS
> Outlook(2003 SP3).
> I have noticed the following,
> - A mail has the <base href> tag defined in the header of the mail html
> - The mail body has a relative tag with <a href
> Once the MailItem.HTMLBody is read the relative tag(<a href>) is replaced
> with the full url.

> eg. The mail has the following html as the source
> <html
> <head
> <base href="http://sample.com/aa/bb/cc"></base
> </head
> <body
> <a href="dd">Text</a
> </body
> </html
> The MailItem.HTMLBody returns the following
> <html
> <head
> <base href="http://sample.com/aa/bb/cc"></base
> </head
> <body
> <a href="http://sample.com/aa/bb/dd">Text</a
> </body
> </html
> But when Redemption.SafeMailItem is used its html results as per original
> mail above(1st html) without the full url for the href tags.
> Is there a facility in Redemption to read the html with the full urls as
> per MS Outlook mail item?
> Redemption ver. in use, 4.5.0.812.

> Please advice.

>
 
D

DPM

Dmitry,

Thanks.

Could you give some hints on how to use the HTMLDocument object so that it

is possible to generate the full urls.

"Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message

news:OwuyjptZKHA.5652@TK2MSFTNGP06.phx.gbl...
> AFAIK Outlook loads the HTML blob into an HTMLDocument object, which
> parses the HTML.
> Redemption simply extracts the HTML body as-is.

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "DPM" <aa@bb.cc> wrote in message
> news:emLBFYrZKHA.196@TK2MSFTNGP05.phx.gbl...
> > Hi,
>

>> I am using a program which reads emails from a selected folder of MS
> > Outlook(2003 SP3).
> > I have noticed the following,
> > - A mail has the <base href> tag defined in the header of the mail html
> > - The mail body has a relative tag with <a href
>> Once the MailItem.HTMLBody is read the relative tag(<a href>) is replaced
> > with the full url.
>

>> eg. The mail has the following html as the source
> > <html
>> <head
>> <base href="http://sample.com/aa/bb/cc"></base
>> </head
>> <body
>> <a href="dd">Text</a
>> </body
>> </html
>
>> The MailItem.HTMLBody returns the following
> > <html
>> <head
>> <base href="http://sample.com/aa/bb/cc"></base
>> </head
>> <body
>> <a href="http://sample.com/aa/bb/dd">Text</a
>> </body
>> </html
>
>> But when Redemption.SafeMailItem is used its html results as per original
> > mail above(1st html) without the full url for the href tags.
> > Is there a facility in Redemption to read the html with the full urls as
> > per MS Outlook mail item?
> > Redemption ver. in use, 4.5.0.812.
>

>> Please advice.
>

>
>>


>
 
D

Dmitry Streblechenko

You'd think that would be easy... Essentially you need to create an instance

of the HTMLDocument object, QI it for IMarkupServices, then call

IMarkupServices::parseString. That method fails a lot on real-world HTML, so

you'd then need to QI for IPersistStreamInit and then call

IPersistStreamInit::Load, which is asynchronous, so you'd need to wait until

HTMLDocument.readyState property becomes "complete" or "interactive".

Dmitry Streblechenko (MVP)

-

"DPM" <aa@bb.cc> wrote in message

news:u5ZomS0ZKHA.2164@TK2MSFTNGP02.phx.gbl...
> Dmitry,

> Thanks.
> Could you give some hints on how to use the HTMLDocument object so that it
> is possible to generate the full urls.

> "Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message
> news:OwuyjptZKHA.5652@TK2MSFTNGP06.phx.gbl...
> > AFAIK Outlook loads the HTML blob into an HTMLDocument object, which
> > parses the HTML.
> > Redemption simply extracts the HTML body as-is.
>

>> > > Dmitry Streblechenko (MVP)
> >

> >

> >

> > -
> > "DPM" <aa@bb.cc> wrote in message
> > news:emLBFYrZKHA.196@TK2MSFTNGP05.phx.gbl...
> >> Hi,
> >
>>> I am using a program which reads emails from a selected folder of MS
> >> Outlook(2003 SP3).
> >> I have noticed the following,
> >> - A mail has the <base href> tag defined in the header of the mail html
> >> - The mail body has a relative tag with <a href
>>> Once the MailItem.HTMLBody is read the relative tag(<a href>) is
> >> replaced with the full url.
> >
>>> eg. The mail has the following html as the source
> >> <html
>>> <head
>>> <base href="http://sample.com/aa/bb/cc"></base
>>> </head
>>> <body
>>> <a href="dd">Text</a
>>> </body
>>> </html
>>
>>> The MailItem.HTMLBody returns the following
> >> <html
>>> <head
>>> <base href="http://sample.com/aa/bb/cc"></base
>>> </head
>>> <body
>>> <a href="http://sample.com/aa/bb/dd">Text</a
>>> </body
>>> </html
>>
>>> But when Redemption.SafeMailItem is used its html results as per
> >> original mail above(1st html) without the full url for the href tags.
> >> Is there a facility in Redemption to read the html with the full urls as
> >> per MS Outlook mail item?
> >> Redemption ver. in use, 4.5.0.812.
> >
>>> Please advice.
> >
>>
>>>

>

>>


>
 
D

DPM

Thanks Dmitry.

"Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message

news:uxznHO7ZKHA.4688@TK2MSFTNGP06.phx.gbl...
> You'd think that would be easy... Essentially you need to create an
> instance of the HTMLDocument object, QI it for IMarkupServices, then call
> IMarkupServices::parseString. That method fails a lot on real-world HTML,
> so you'd then need to QI for IPersistStreamInit and then call
> IPersistStreamInit::Load, which is asynchronous, so you'd need to wait
> until HTMLDocument.readyState property becomes "complete" or
> "interactive".

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "DPM" <aa@bb.cc> wrote in message
> news:u5ZomS0ZKHA.2164@TK2MSFTNGP02.phx.gbl...
> > Dmitry,
>

>> Thanks.
> > Could you give some hints on how to use the HTMLDocument object so that
> > it is possible to generate the full urls.
>

>
>> "Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message
> > news:OwuyjptZKHA.5652@TK2MSFTNGP06.phx.gbl...
> >> AFAIK Outlook loads the HTML blob into an HTMLDocument object, which
> >> parses the HTML.
> >> Redemption simply extracts the HTML body as-is.
> >
>>> > >> Dmitry Streblechenko (MVP)
> >>

> >>

> >>

> >> -
> >> "DPM" <aa@bb.cc> wrote in message
> >> news:emLBFYrZKHA.196@TK2MSFTNGP05.phx.gbl...
> >>> Hi,
> >>
>>>> I am using a program which reads emails from a selected folder of MS
> >>> Outlook(2003 SP3).
> >>> I have noticed the following,
> >>> - A mail has the <base href> tag defined in the header of the mail html
> >>> - The mail body has a relative tag with <a href
>>>> Once the MailItem.HTMLBody is read the relative tag(<a href>) is
> >>> replaced with the full url.
> >>
>>>> eg. The mail has the following html as the source
> >>> <html
>>>> <head
>>>> <base href="http://sample.com/aa/bb/cc"></base
>>>> </head
>>>> <body
>>>> <a href="dd">Text</a
>>>> </body
>>>> </html
>>>
>>>> The MailItem.HTMLBody returns the following
> >>> <html
>>>> <head
>>>> <base href="http://sample.com/aa/bb/cc"></base
>>>> </head
>>>> <body
>>>> <a href="http://sample.com/aa/bb/dd">Text</a
>>>> </body
>>>> </html
>>>
>>>> But when Redemption.SafeMailItem is used its html results as per
> >>> original mail above(1st html) without the full url for the href tags.
> >>> Is there a facility in Redemption to read the html with the full urls
> >>> as per MS Outlook mail item?
> >>> Redemption ver. in use, 4.5.0.812.
> >>
>>>> Please advice.
> >>
>>>
>>>
>>
>>>

>

>>


>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
B 2003 >> 2010 outlook today security changes (Iframes? Href?) Using Outlook 1
P Categorize in Calendar not listed under tags in Office 365 (Office 2016) Using Outlook 5
T Html tags in Message body Using Outlook 1
M Is there a reference for the valid XML tags and their options? Calendar Printing Assistant 3
F "MSG" type attachments are stripped away when senand previewed with HTML tags. Using Outlook 3
T How to Assign Retention Tags for Notes Items in Exchange/Outlook 2010? Exchange Server Administration 0
R Outlook 2010: Text in Body Being Change, HTML tags/code showing Using Outlook 3
K Retention Tags - expired items not deleted from Deleted Items Exchange Server Administration 21
P Retention Policy Tags (Delete and Allow Recovery) Inbox and Sent Items Exchange Server Administration 2
R Using Outlook 2007 I have somehow turned on something that now I see the HTML tags when I create a new email. Using Outlook 3
M SP1 retention policy tags Exchange Server Administration 1
D Exchange 2010 SP1 Rention Tags and Policies Exchange Server Administration 2
K Outlooki is dropping characters, sentences and paragraphs and sometimes displaying style tags Using Outlook 2
P smart tags in Outlook 2007 Outlook VBA and Custom Forms 4
Q Smart Tags - Telephone Number recognizing the contact information Outlook VBA and Custom Forms 3
N Free/busy publish at http location does not work Using Outlook 1
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
M Deleting attachments does not reduce file size Using Outlook 0
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
M Outlook .com group does not show up in Outlook for office 365 home Using Outlook 3
W Outlook Calendar does not save view any longer! Using Outlook 3
B Outlook 2016 Does not Shutdown Correctly Using Outlook 3
P Desktop doesn't index Outlook IMAP files, laptop Outlook does index those same IMAP files Using Outlook 2
G Entered data in custom field goes in card and does not stay in list view Outlook VBA and Custom Forms 1
witzker social connector 2010 does not show all emails to or from contact Using Outlook 3
witzker social connector 2010 does not show all emails to or from contact New Slipstick.com Articles 0
Rupert Dragwater Email flag does not show up in Outlook2013 Using Outlook 13
J Outlook 2016 message content does not display - outlook.com; exchange Using Outlook.com accounts in Outlook 9
D Outlook 2016 IMAP Connection Returns All Email but outlook.com does NOT Using Outlook.com accounts in Outlook 2
A BCM does not work anymore! BCM (Business Contact Manager) 1
D Outlook 2016: /altvba startup switch does not work Using Outlook 2
A BCM does not work with Windows 10 1703 any more BCM (Business Contact Manager) 3
S Outlook does not open the .pst file created by the Outlook Using Outlook 5
Q Undisclosed recipients does not include sender Using Outlook 1
N Does a Shared Folder Policy override a Digital Signature Setting for macros? Outlook VBA and Custom Forms 6
E What does mean this icon at the picture attached? Using Outlook 2
O Windows 10 x64 Outlook 2013 - URL does not open (anymore) Using Outlook 3
M How does Outlook determine item numbers in a folder? Outlook VBA and Custom Forms 3
LarryS change day template as cpao does not see .catx files Outlook VBA and Custom Forms 4
C Discovery search does not show autoforwarded messages Exchange Server Administration 1
C Unchecking "Send immediately when connected" does not work on apps that call Outlook Using Outlook 1
J Outlook 2010 VBScript editor does not run code at all Outlook VBA and Custom Forms 0
Mark Foley Time span on WebDAV published Calendars does not appear to be working Using Outlook 7
snhnic Macro that does not overwrite but add a number Outlook VBA and Custom Forms 1
Rupert Dragwater Deleting email from Deleted Items does not work Using Outlook 0
G Outlook does not show new appointments in To-Do-Bar Using Outlook 0
G Calendar does not point to deafult data file Using Outlook 0
Diane Poremsky What does the "J" mean? New Slipstick.com Articles 0
Christiaan Could not complete operation because the service provider does not support it Using Outlook 2
Similar threads


















































Top