href tags does not result in the full url with Redemption

  • Thread starter Thread starter DPM
  • Start date Start date
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.
 
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.

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

>
>>


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

>

>>


>
 
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.
Similar threads
Thread starter Title 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? Using Outlook 3
F "MSG" type attachments are stripped away when senand previewed with HTML tags. Using Outlook 3
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
D Send on behalf of does not store the base mailbox Using Outlook 0
e_a_g_l_e_p_i Why does MS do these things???? Using Outlook 4
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
J Event/Meeting in Outlook Does Not Align with SharePoint Calendar Using Outlook 5
C Code to move mail with certain attachment name? Does Not work Outlook VBA and Custom Forms 3
J Does the .fdm contain my custom form? How to make ol use it? - ol2007 Outlook VBA and Custom Forms 4
C Why does Outlook (desktop) 365 for Windows keep making me input my passwords? Using Outlook 12
G Script does not exist Outlook VBA and Custom Forms 0
J WshShell.Popup does't timeout Outlook VBA and Custom Forms 3
N Save selected messages VBA does not save replies and/or messages that contain : in subject Outlook VBA and Custom Forms 1
T Junk Email does not get added to the Blocked Sender List Using Outlook 0
L Does this really work and get thru virus and malware blocks? Using Outlook 3
V Outlook 2016 Does Outlook-2016 (64 bit) work with iCloud for Windows ? Using Outlook 5
F Junk Email does not get added to the Blocked Sender List Using Outlook 4
N Free/busy publish at http location does not work Using Outlook 0
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 Using Outlook 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

Similar threads

Back
Top