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:
Quote:
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:
>
Quote:
>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:
>>
Quote:
>>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$@paldino@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.
>>>>
>>>>