Sardine Sandwich

Ok, so I can’t even remember exactly how it started, but here is what I remember.

I’ve been trying to change some long time habits, and adjust my lifestyle a bit which are:

  1. Eat more than one meal a day Smile.  I was literally only eating Dinner, and very late at that.
  2. Eat at home more, and stop the fast food shuffle.

The reasons should be pretty obvious, 1 to realign my metabolism to aid in weight loss (i.e. not eating that one meal a day, late in the evening Smile) and two, just to stop spending so much darn money eating out.

Long story short, I decided to start taking a photo of things I was preparing myself and posting the pictures on facebook to basically make other people hungry and to annoy (in a completely loving way) a friend of mine.  This led to this friend saying the other day something to the effect of “OMG, I wish you would stop, I mean you’d take a picture of a Sardine Sandwich and post it knowing you”. 

She said this, thinking this was the most far off thing and that I would not just have the ingredients laying around the house.

Well, let’s just say 3 minutes later after that statement I posted the following picture Smile.

DSC03011 - Copy

And no, I didn’t eat it.  But it was a fun joke Smile

– Keith

Incoming Email ServerName whoops!

This post is in regards to WSS 3.0/MOSS 2007 but I’m sure the same applies in 2010.

I’m working on a project in which we’re handling responses from users via an email enabled list, that will then programmatically take action on a workflow task on behalf of the user.  This is so the business users can approve/reject a given task on their mobile devices without having to be physically connected to the companies internal network.

In the email body that we’re generating for the response, we’re generating the reply to address for the email as <listalias>.<hostingserver> where listalias is the name we’ve configured on the incoming email settings for the list, and hostingserver is the host address for the SharePoint server which is handling incoming email.

The problem was I was using the ServerAddress property of the SPIncomingEmailService instance to get the server address (Which might naturally be your first choice), such as the following:

String serverAddress = Microsoft.SharePoint.Administration.SPFarm.Local.Services.GetValue<Microsoft.SharePoint.Administration.SPIncomingEmailService>().ServerAddress;

but that doesn’t give you the actual name configured in the Incoming Email settings in Central Admin (Operations/Incoming e-mail settings/E-mail server display address).  To get that value, you need to use ServerDisplayAddress.

Just thought I would share

– Keith