So, I've decided that extended periods of time off of work go better for me if I can keep tabs on what's going on back at the office . Mind you, when I'm on vacation, I have no intention of actually doing and work, but if I don't at least keep a vague idea of what's going on back there, it's 1000x harder when I get back...Which is why it's always been nice to be able to check my work email from home, or even better, from my phone...until the powers that be at work decided to make everyone use secureID tokens whatnot. Who needs the hassle?
As a result, I've been without a means of keeping an eye on things for the last year or so. I've played with things like Emoze and ATT XpressMail to get my Exchange email from work forwarded to my cell, but they've been flaky at best. (Finding a useable J2ME POP client for my RAZR v3xx was a PITA to start with).
My friend Ross and I have talked about this before and he's suggested on multiple occasions that I should get everything forwarded to Gmail so I could read it at home without pulling out my secret decoder ring, and have access on the handset too. Sounds great...except the ogres at the office have disabled forwarding and redirecting to outside addresses, so that was a no go.
Today I got tired of it (again) and took another look. Using the wonderful Redemption library I was able to create an Outlook VBA macro which would forward any new message sent to my work account to my gmail account. Nice. But, it was a forward...so every message looks like it came from myself, and I couldn't reply to them if I wanted to. A little more googling and I pieced together some code which uses CDO to create a new message (pulling the sender details, subject, and body from the original) and sends it off to gmail. So, now every time someone sends me a message at work, it's automatically redirected to my gmail account. A little subject parsing, and Gmail filters will bypass the inbox and shove it in a label for me. Wonderful.
Outlook does need to be running all the time on a machine at work, but I was already doing that for the never-quite-working emoze experiment, so that's no big deal. You need to make sure the machine running Outlook has CDO and Redemption installed and registered, and have an SMTP server somewhere you can use.
Part two will be getting attachments to come with the message. But for now, I'm a happy camper. I can get back to enjoying my time off...while still being able to check in with the asylum every once in a while.
Here's the code I used:
Private Sub application_NewMail()
Dim myItem As Redemption.RDOMail
Dim msg As Redemption.RDOMail
Set myNS = Application.GetNamespace("MAPI")
Set mySession = CreateObject("Redemption.RDOSession")
mySession.MAPIOBJECT = myNS.MAPIOBJECT
Set Inbox = mySession.GetDefaultFolder(olFolderInbox)
Set myItems = Inbox.Items
Set myItem = myItems.GetFirst
Dim iMsg
Dim iConf
Dim Flds
Dim szServer
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
szServer = "http://schemas.microsoft.com/cdo/configuration/"
With Flds
.Item(szServer & "smtpserver") = "SMTP SERVER HERE"
.Item(szServer & "smtpconnectiontimeout") = 1000 ' quick timeout
.Update
End With
Set iMsg.Configuration = iConf
iMsg.To = "GMAIL ADDRESS"
iMsg.From = myItem.Sender.SMTPAddress
iMsg.Subject = "STUFF HERE FOR FILTERING/ " + myItem.Subject
iMsg.textBody = myItem.Body
iMsg.Send
myItem.UnRead = True
End Sub
Which professional athlete in any sport has the most star power?
Michael Jordan. Even years after he retired from the NBA. Actually, did he retire?
Foreign language was my worst subject in high school and I truly believe it's due to the fact that I don't understand the English language. How could anyone teach me another language when I don't even understand the one I speak? I've just found a great site that will help me take the first step on my long road to understanding the English language. My first lesson today was affect vs. effect, finally after all of these years, I get it. I hope this site will have a positive EFFECT on you as well! ;)
There's just something about shoes that click.
You know, that cla sound a good hard heel makes as you take a step. Followed by the corresponding clack as the toe descends and strikes the ground. Tennis shoes don't do it. Sketchers or sandals? Nope. Slippers? Don't think so. But when you put on a nice pair of dress shoes and step out, things change a little bit.
You find yourself standing straighter, stepping more confidently...strutting.
Ordering scotch or a martini instead of beer or even wine.
Sophistication.
Cla-clack. Yeah, that's it, baby.
or this would be a long road for us all. Robb just asked me if I have things I feel I need to write about. As we all know, I'm not an intellectual (I'm not saying I'm not intelligent, but I know I'm not well read or well written for that matter). I intend to use this as a place to dump my thoughts and reflect, not as a place to flex my intellectual muscle. I like the idea of having a place to express my views, feelings, etc. without interruption. Blogs allow you to command the floor and not have to entertain other people's interjections, whether they're trying to be nice or trying to be assholes. I have to listen to enough people's opinions all day at work, so it's nice to find some peace and quiet here. Ross, thanks for the inspiration, please don't read any of this, it will just embarrass the crap out of me, as I am not nearly as entertaining as you are.
Remember when you were a wee little lad (or lass) and your school would have that dreaded event...the dance? Where everyone except the principal, the english teacher, and those one or two uber popular (and totally fearless) youngsters would be hanging against the walls of the gym, whispering to each other, but not daring to venture to the center, let alone the other side...
I had a brief encounter with that experience the other night.
Kari and I went over to our best friends' place for a New Years eve shindig - to which they'd invited another couple they've been friends with for a long time...friends whom they wanted us to meet, in hopes that we'd all get along and plan future things together.
First, let me say that we all hit it off quite well (in my opinion) and I'd love to hang out with the "other friends" any time.
But.
Before that fact had been cemented there was the moment of thier arrival. Which filled me with a sense of trepidation and fear reminiscent of said dance from 20 years ago..."will they like me?"..."am I funny?"..."is their something hanging out of my nose?" It passed farily quickly, once introductions were made and all...but still, for several brief moments, I was 13 again. In the gym. Looking at my shoes.