Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parse email and forward certain text

56 views
Skip to first unread message

bhicks14

unread,
Jan 4, 2010, 3:28:21 PM1/4/10
to brenno...@corningfcu.org
I am sure this can be done, I'm just to new to Powershell to figure it
out. I am using Outlook 2010 beta. I would like to create a rule
that when an email from a certain sender, with a certain Subject
line, comes into my Inbox launch a powershell script. This script
will parse the email and forward everything between a particular word
and a .(period) to my cell phone.

I am also looking to implement this in a couple other scenarios, but
if I can get the above figured out I think I can handle the others.

Thanks

Rob Campbell

unread,
Jan 4, 2010, 4:23:01 PM1/4/10
to
I'd look at the EWS managed API for this.


"bhicks14" wrote:

> .
>

Martin Zugec

unread,
Jan 4, 2010, 4:30:36 PM1/4/10
to

Hi,

I expect you are talking about client-side solution.

I would recommend following:
1.) Create any rule filters you want (from, subject etc.)
2.) Add to that rule two actions - move to folder (or add to category) and
run your script
3.) Script will check that folder (or category), process it and then move it
somewhere else

Martin

"bhicks14" <bhic...@live.com> wrote in message
news:f72b1fb3-b223-4319...@u41g2000yqe.googlegroups.com...

bhicks14

unread,
Jan 5, 2010, 8:23:11 AM1/5/10
to
EWS looks a little over my head right now, soemthing else I would need
to learn on top of grasping Powershell to begin with.

Doesn't matter to me whether this is server side or client, server
would be better, but my Outlook client is open almost all of the time,
so either will work.

First I need a script that can do what I am referring to, I haven't
been able to create one that will do what I need.
I also want this to all be as automated as possible, no user
interaction if possible, basically we have email generated based on
certain things, when I receive one of those I want it to send a text
message to my phone. I can add my phone number into the list of
emails it sends to, the problem is that I don't get the part of the
message I really want because of the character limitation in texting.

bhicks14

unread,
Jan 5, 2010, 8:23:19 AM1/5/10
to

Martin Zugec

unread,
Jan 5, 2010, 12:42:36 PM1/5/10
to
Use Outlook COM interface:
http://support.microsoft.com/default.aspx/kb/310244

Anyway, quick hint:
$outlook = new-object -com outlook.application
$MAPINamespace = $outlook.GetNamespace("MAPI")
$MyFolder = $MapiNamespace.Folders | Where {$_.Name -eq "xxx"}
...

etc, etc... Once you got your folder, you can access mails using Items
property

Martin

"bhicks14" <bhic...@live.com> wrote in message

news:4cfe2f70-f7f3-443a...@k17g2000yqh.googlegroups.com...

Rob Campbell

unread,
Jan 5, 2010, 6:27:01 PM1/5/10
to
Unless you're already familiar with scripting Outlook via COM, you may be
looking at a steep learning curve either way.

I'm an Exchange admin who never did grok VB and consequently never did any
COM automation of Outlook, so my preference would be the EWS solution. It
only requrires the .dll and Powershell, so it's very portable. You don't
have to install Outlook or configure a MAPI profile if you want to run it
from a server somewhere.

Both EWS and Outlook will be "client side", regardless of where they run. A
server side solution would be something like a transport event sink installed
on the HT servers. I don't think you want to do that.

"bhicks14" wrote:

> .
>

0 new messages