Creating a mail rule programatically or with certain syntax

1

I want to create an Outlook mail rule for every company that I deal with so that @xyzcompany.com goes to xyz company folder and @abccompany.com goes to abcompany etc.. without creating a rule for each one.

It would have to create folders for new companies that I haven't dealt with.

If anyone has any ideas I would be most grateful.

Roger Hills

Posted 2016-08-26T12:03:55.300

Reputation: 11

Are you connecting to an Exchange server to get your email? – Ƭᴇcʜιᴇ007 – 2016-08-26T12:07:29.423

@Ƭᴇcʜιᴇ007 does that matter? – LPChip – 2016-08-26T12:08:08.267

@LChip Yes, because server-side rules can be programmatically created at the Exchange server, or via EWS. I guess maybe I should have immediate suffixed it with "Do you have access to it?" :) – Ƭᴇcʜιᴇ007 – 2016-08-26T12:11:00.940

I am using an exchange server. I am not sure why it would matter. – Roger Hills – 2016-08-26T12:11:12.493

@RogerHills Do you have (admin) access to your Exchange server? – Ƭᴇcʜιᴇ007 – 2016-08-26T12:12:32.090

nope its on 365 unfortunately – Roger Hills – 2016-08-26T12:14:26.947

@RogerHills do you have admin access to the Office365 environment? A lot can be done with powershell. – LPChip – 2016-08-26T12:33:34.863

Sorry didn't see this I dont but my colleague does. So if I google for powershell and 365 I might see something. – Roger Hills – 2016-08-30T02:29:44.013

No answers