By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

Sending a Sharing Invitation for a RSS Feed to a Outlook 2007 user

P: n/a
mc
I would like to be able to send from an ASP.NET page an email which when recieved takes the form of
a "Sharing Invitation for a RSS Feed" (http://office.microsoft.com/en-us/ou...595391033.aspx)

I've found a MSDN article about it (http://msdn2.microsoft.com/en-us/library/bb176432.aspx) but that
example is presented as a vb(a) script from within outlook.

Can this functionality be emulated from sending an email from C#?

TIA

MC
May 11 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
mc,

It's really nothing more than an email message with some extra headers
added. When I sent a feed to myself, these are the headers that I saw:

Message-ID: <00bd01c793ee$18e99810$4abcc830$@pa*****@exisconsu lting.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AceT7hiW9pqbs1LDSbyX6nYoED6UDg==
Content-Language: en-us
content-class: Sharing
x-sharing-capabilities: 28001
x-sharing-flavor: 310
x-sharing-instance-guid: 964EB63011711D41910A86650B07AA42
x-sharing-provider-guid: AFF0060000000000C000000000000046
x-sharing-provider-name: RSS Feeds
x-sharing-provider-url: http://www.microsoft.com/rss/
x-sharing-remote-path: http://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-remote-name: restaurantgirl
x-sharing-remote-store-uid:
x-sharing-remote-uid:
x-sharing-remote-type: text/xml
x-sharing-local-type: IPF.Note
x-sharing-config-url:
outlookfeed://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-browse-url:

I can't seem to find any information about these headers on the web, so
I'm assuming that it is not public knowledge. However, I am guessing that
you can probably replace the instance and the provider guid (the provider
guids should be constant for items you provide) as well as the feed url
(obvioiusly) and you might be able to get it to work. You can easily send
an email using the classes int the System.Net.Mail namespace, as well as set
headers yourself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"mc" <mc@community.nospamwrote in message
news:46********@mail.hmgcc.gov.uk...
>I would like to be able to send from an ASP.NET page an email which when
recieved takes the form of a "Sharing Invitation for a RSS Feed"
(http://office.microsoft.com/en-us/ou...595391033.aspx)

I've found a MSDN article about it
(http://msdn2.microsoft.com/en-us/library/bb176432.aspx) but that example
is presented as a vb(a) script from within outlook.

Can this functionality be emulated from sending an email from C#?

TIA

MC

May 11 '07 #2

P: n/a
mc
This is as I hoped would be the case, I will have a go adding the extra headers, Where would I be
able to get the x-sharing-instance-guid, x-sharing-provider-guid? Or do these just need to be unique
guids?

Regards
MC

Nicholas Paldino [.NET/C# MVP] wrote:
mc,

It's really nothing more than an email message with some extra headers
added. When I sent a feed to myself, these are the headers that I saw:

Message-ID: <00bd01c793ee$18e99810$4abcc830$@pa*****@exisconsu lting.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AceT7hiW9pqbs1LDSbyX6nYoED6UDg==
Content-Language: en-us
content-class: Sharing
x-sharing-capabilities: 28001
x-sharing-flavor: 310
x-sharing-instance-guid: 964EB63011711D41910A86650B07AA42
x-sharing-provider-guid: AFF0060000000000C000000000000046
x-sharing-provider-name: RSS Feeds
x-sharing-provider-url: http://www.microsoft.com/rss/
x-sharing-remote-path: http://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-remote-name: restaurantgirl
x-sharing-remote-store-uid:
x-sharing-remote-uid:
x-sharing-remote-type: text/xml
x-sharing-local-type: IPF.Note
x-sharing-config-url:
outlookfeed://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-browse-url:

I can't seem to find any information about these headers on the web, so
I'm assuming that it is not public knowledge. However, I am guessing that
you can probably replace the instance and the provider guid (the provider
guids should be constant for items you provide) as well as the feed url
(obvioiusly) and you might be able to get it to work. You can easily send
an email using the classes int the System.Net.Mail namespace, as well as set
headers yourself.

Hope this helps.

May 14 '07 #3

P: n/a
mc
I've had a go and it doesn't appear to have worked.

The system.Net.Mail class does not seem to allow me to have headers with null values. So I have
omitted the Headers without values. Would this matter?

The outlookfeed field appears to not be a normal header? How would I add this header to the message?

Still not sure what to use for the Guid values.

When I send a RSS Sharing request from myself to myself in Outlook 2007 how do I see the headers?
when I try and inspect the Headers in Message Options It's blank and the Message source only
contains the body of the message.

Something odd is happening because when I first receive my Share email I can read it however if I
try to re-read the message I get an error "Cannot open this item".

Any help would be appreciated!

TIA

MC
mc wrote:
This is as I hoped would be the case, I will have a go adding the extra
headers, Where would I be able to get the x-sharing-instance-guid,
x-sharing-provider-guid? Or do these just need to be unique guids?

Regards
MC

Nicholas Paldino [.NET/C# MVP] wrote:
>mc,

It's really nothing more than an email message with some extra
headers added. When I sent a feed to myself, these are the headers
that I saw:

Message-ID: <00bd01c793ee$18e99810$4abcc830$@pa*****@exisconsu lting.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AceT7hiW9pqbs1LDSbyX6nYoED6UDg==
Content-Language: en-us
content-class: Sharing
x-sharing-capabilities: 28001
x-sharing-flavor: 310
x-sharing-instance-guid: 964EB63011711D41910A86650B07AA42
x-sharing-provider-guid: AFF0060000000000C000000000000046
x-sharing-provider-name: RSS Feeds
x-sharing-provider-url: http://www.microsoft.com/rss/
x-sharing-remote-path:
http://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-remote-name: restaurantgirl
x-sharing-remote-store-uid:
x-sharing-remote-uid:
x-sharing-remote-type: text/xml
x-sharing-local-type: IPF.Note
x-sharing-config-url:
outlookfeed://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-browse-url:

I can't seem to find any information about these headers on the
web, so I'm assuming that it is not public knowledge. However, I am
guessing that you can probably replace the instance and the provider
guid (the provider guids should be constant for items you provide) as
well as the feed url (obvioiusly) and you might be able to get it to
work. You can easily send an email using the classes int the
System.Net.Mail namespace, as well as set headers yourself.

Hope this helps.

May 14 '07 #4

P: n/a
mc
Oops, just spotted that the outlookfeed had probably been word wrapped from the line above
"x-sharing-config-url". Now I've made the change the mail gets sent to outlook and on the inital
viewing the mail appears to be a "normal" mail, when I click off and back on again it recognizes
it's a "share" mail and works fine?

Regards
MC
mc wrote:
I've had a go and it doesn't appear to have worked.

The system.Net.Mail class does not seem to allow me to have headers with
null values. So I have omitted the Headers without values. Would this
matter?

The outlookfeed field appears to not be a normal header? How would I add
this header to the message?

Still not sure what to use for the Guid values.

When I send a RSS Sharing request from myself to myself in Outlook 2007
how do I see the headers? when I try and inspect the Headers in Message
Options It's blank and the Message source only contains the body of the
message.

Something odd is happening because when I first receive my Share email I
can read it however if I try to re-read the message I get an error
"Cannot open this item".

Any help would be appreciated!

TIA

MC
mc wrote:
>This is as I hoped would be the case, I will have a go adding the
extra headers, Where would I be able to get the
x-sharing-instance-guid, x-sharing-provider-guid? Or do these just
need to be unique guids?

Regards
MC

Nicholas Paldino [.NET/C# MVP] wrote:
>>mc,

It's really nothing more than an email message with some extra
headers added. When I sent a feed to myself, these are the headers
that I saw:

Message-ID: <00bd01c793ee$18e99810$4abcc830$@pa*****@exisconsu lting.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AceT7hiW9pqbs1LDSbyX6nYoED6UDg==
Content-Language: en-us
content-class: Sharing
x-sharing-capabilities: 28001
x-sharing-flavor: 310
x-sharing-instance-guid: 964EB63011711D41910A86650B07AA42
x-sharing-provider-guid: AFF0060000000000C000000000000046
x-sharing-provider-name: RSS Feeds
x-sharing-provider-url: http://www.microsoft.com/rss/
x-sharing-remote-path:
http://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-remote-name: restaurantgirl
x-sharing-remote-store-uid:
x-sharing-remote-uid:
x-sharing-remote-type: text/xml
x-sharing-local-type: IPF.Note
x-sharing-config-url:
outlookfeed://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-browse-url:

I can't seem to find any information about these headers on the
web, so I'm assuming that it is not public knowledge. However, I am
guessing that you can probably replace the instance and the provider
guid (the provider guids should be constant for items you provide) as
well as the feed url (obvioiusly) and you might be able to get it to
work. You can easily send an email using the classes int the
System.Net.Mail namespace, as well as set headers yourself.

Hope this helps.

May 14 '07 #5

P: n/a
mc
I've spent a little more time looking at this issue and have trimmed the headers that are
required/used by outlook 2007. The function I have created is shown below.

I've found that if you substitute the http:// for outlookfeed:// in a hyperlink on a website or in
the body of the email you can, once clicked, cause outlook to load the RSS feed.

However I would still like Outlook to recognize my additional headers the first time the email is
viewed. Any help fixing this issue would be greatfully received.

The US Patent Applicatation (http://www.freepatentsonline.com/20060123011.html) provides the only
documentation I've been able to find in support of this functionality.

Regards
MC

///<summary>
/// Function to send an email from the current user to a specfied user prompting
/// them to share a RSS feed.
///</summary>
public void SendRssInviteEmail(string toEmailAddress, string Subject, string Body, string FeedTitle,
string FeedUrl){
try{
SmtpClient Client = new SmtpClient("mail.domain");
MailMessage Msg = new MailMessage(User.Identity.Name.Substring(User.Iden tity.Name.IndexOf("\\")+1)
+ "@mail.domain", toEmailAddress, Subject, Body);
Msg.IsBodyHtml = true;
Msg.Headers.Add("content-class", "Sharing");
Msg.Headers.Add("x-sharing-remote-name", FeedTitle);
Msg.Headers.Add("x-sharing-config-url", FeedUrl.Replace("http://", "outlookfeed://"));
Client.Send(Msg);
}
catch{
//Probably should do something?
}
}

mc wrote:
Oops, just spotted that the outlookfeed had probably been word wrapped
from the line above "x-sharing-config-url". Now I've made the change the
mail gets sent to outlook and on the inital viewing the mail appears to
be a "normal" mail, when I click off and back on again it recognizes
it's a "share" mail and works fine?

Regards
MC
mc wrote:
>I've had a go and it doesn't appear to have worked.

The system.Net.Mail class does not seem to allow me to have headers
with null values. So I have omitted the Headers without values. Would
this matter?

The outlookfeed field appears to not be a normal header? How would I
add this header to the message?

Still not sure what to use for the Guid values.

When I send a RSS Sharing request from myself to myself in Outlook
2007 how do I see the headers? when I try and inspect the Headers in
Message Options It's blank and the Message source only contains the
body of the message.

Something odd is happening because when I first receive my Share email
I can read it however if I try to re-read the message I get an error
"Cannot open this item".

Any help would be appreciated!

TIA

MC
mc wrote:
>>This is as I hoped would be the case, I will have a go adding the
extra headers, Where would I be able to get the
x-sharing-instance-guid, x-sharing-provider-guid? Or do these just
need to be unique guids?

Regards
MC

Nicholas Paldino [.NET/C# MVP] wrote:

mc,

It's really nothing more than an email message with some extra
headers added. When I sent a feed to myself, these are the headers
that I saw:

Message-ID:
<00bd01c793ee$18e99810$4abcc830$@pa*****@exisco nsulting.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AceT7hiW9pqbs1LDSbyX6nYoED6UDg==
Content-Language: en-us
content-class: Sharing
x-sharing-capabilities: 28001
x-sharing-flavor: 310
x-sharing-instance-guid: 964EB63011711D41910A86650B07AA42
x-sharing-provider-guid: AFF0060000000000C000000000000046
x-sharing-provider-name: RSS Feeds
x-sharing-provider-url: http://www.microsoft.com/rss/
x-sharing-remote-path:
http://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-remote-name: restaurantgirl
x-sharing-remote-store-uid:
x-sharing-remote-uid:
x-sharing-remote-type: text/xml
x-sharing-local-type: IPF.Note
x-sharing-config-url:
outlookfeed://www.restaurantgirl.com/restaurantgirl/rss.xml
x-sharing-browse-url:

I can't seem to find any information about these headers on the
web, so I'm assuming that it is not public knowledge. However, I am
guessing that you can probably replace the instance and the provider
guid (the provider guids should be constant for items you provide)
as well as the feed url (obvioiusly) and you might be able to get it
to work. You can easily send an email using the classes int the
System.Net.Mail namespace, as well as set headers yourself.

Hope this helps.

May 14 '07 #6

P: n/a
Hi MC,

I'm currently consulting your question within our internal discussion list
to see if there's any public documentation available for the RSS Feed
invitation e-mail message. I'll keep you posted. Thank you for your
patience and understanding.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 15 '07 #7

P: n/a
Hi MC,

I've been confirmed by our product team that currently we don't have
published document for creating RSS feed sharing invitation email message
in Outlook 2007. We plan to add this in future version of Outlook. Sorry
for the inconvenience caused.

Although we don't encourage to reverse engineer the message headers, the
headers are all there for your inspection.

Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 16 '07 #8

P: n/a
mc
So to summarize the official Microsoft line is that it is not possible/supported to create Sharing
requests from outside outlook (until some future release)?

I would be interested to hear if my code snippet is tested by someone else they get the same symptoms?
Regards
MC

Walter Wang [MSFT] wrote:
Hi MC,

I've been confirmed by our product team that currently we don't have
published document for creating RSS feed sharing invitation email message
in Outlook 2007. We plan to add this in future version of Outlook. Sorry
for the inconvenience caused.

Although we don't encourage to reverse engineer the message headers, the
headers are all there for your inspection.

Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
May 17 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.